From e3dba82cf3cdbdf5c0aad3d308013695a2074ecf Mon Sep 17 00:00:00 2001 From: Indrajith K L Date: Sat, 27 Mar 2021 21:57:16 +0530 Subject: Code Refactoring * Adds Config for commands * Moved Casual Messages to language.json --- src/commands/stop.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/commands/stop.js (limited to 'src/commands/stop.js') 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 -- cgit v1.2.3