Add channelEmpty event in the readme
This commit is contained in:
parent
4c835286bc
commit
4e1d27cbb8
1 changed files with 5 additions and 1 deletions
|
@ -47,6 +47,7 @@ client.login(settings.token);
|
||||||
You can pass a third parameter when instantiating the class Player: the **options** object:
|
You can pass a third parameter when instantiating the class Player: the **options** object:
|
||||||
**options.leaveOnEnd**: whether the bot should leave the voice channel when there is no more song in the queue.
|
**options.leaveOnEnd**: whether the bot should leave the voice channel when there is no more song in the queue.
|
||||||
**options.leaveOnStop**: whether the bot should leave the voice channel when the `stop()` function is used.
|
**options.leaveOnStop**: whether the bot should leave the voice channel when the `stop()` function is used.
|
||||||
|
**options.leaveOnEmpty**: whether the bot should leave the voice channel if there is no more member in it.
|
||||||
|
|
||||||
### Features Overview
|
### Features Overview
|
||||||
|
|
||||||
|
@ -82,6 +83,9 @@ client.player.getQueue(guildID)
|
||||||
})
|
})
|
||||||
.on('songChanged', (oldSong, newSong) => {
|
.on('songChanged', (oldSong, newSong) => {
|
||||||
message.channel.send(`Now playing ${newSong.name}...`);
|
message.channel.send(`Now playing ${newSong.name}...`);
|
||||||
|
})
|
||||||
|
.on('channelEmpty', () => {
|
||||||
|
message.channel.send('Stop playing, there is no more member in the voice channel...');
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue