From 4e1d27cbb870049cc674d4848569e3dadffd0426 Mon Sep 17 00:00:00 2001 From: Androz2091 Date: Sun, 12 Jan 2020 18:56:28 +0100 Subject: [PATCH] Add channelEmpty event in the readme --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 519c6e6..6136f9e 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,8 @@ client.login(settings.token); 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.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 @@ -82,6 +83,9 @@ client.player.getQueue(guildID) }) .on('songChanged', (oldSong, newSong) => { message.channel.send(`Now playing ${newSong.name}...`); +}) +.on('channelEmpty', () => { + message.channel.send('Stop playing, there is no more member in the voice channel...'); }); ```