diff options
author | Indrajith K L | 2021-03-27 21:57:16 +0530 |
---|---|---|
committer | Indrajith K L | 2021-03-27 21:57:16 +0530 |
commit | e3dba82cf3cdbdf5c0aad3d308013695a2074ecf (patch) | |
tree | 83b1b0f5f968ca3f4c260a068fe364821e68176a /src/commands/stop.js | |
parent | 6048206733b3d6bb9ffbacb3e54f4bef88777585 (diff) | |
download | radio-bot-e3dba82cf3cdbdf5c0aad3d308013695a2074ecf.tar.gz radio-bot-e3dba82cf3cdbdf5c0aad3d308013695a2074ecf.tar.bz2 radio-bot-e3dba82cf3cdbdf5c0aad3d308013695a2074ecf.zip |
Code Refactoring
* Adds Config for commands
* Moved Casual Messages to language.json
Diffstat (limited to 'src/commands/stop.js')
-rw-r--r-- | src/commands/stop.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/commands/stop.js b/src/commands/stop.js new file mode 100644 index 0000000..0c5e3df --- /dev/null +++ b/src/commands/stop.js @@ -0,0 +1,17 @@ +async function stopMusik(client,message) { + const voiceChannel = message.member.voice.channel; + + if (!voiceChannel) { + return message.channel.send("Join a voice channel to Execute this command"); + } + + await voiceChannel.leave(); + await message.channel.send("Stoping Music... Baye Baye.... 😅"); + client.user.setPresence({ activity: { name: `COMMANDS`, type: 'LISTENING' } }); +} + +module.exports = { + execute(client,message, args) { + stopMusik(client, message); + } +}
\ No newline at end of file |