aboutsummaryrefslogtreecommitdiff
path: root/src/commands/stop.js
diff options
context:
space:
mode:
authorIndrajith K L2021-03-27 21:57:16 +0530
committerIndrajith K L2021-03-27 21:57:16 +0530
commite3dba82cf3cdbdf5c0aad3d308013695a2074ecf (patch)
tree83b1b0f5f968ca3f4c260a068fe364821e68176a /src/commands/stop.js
parent6048206733b3d6bb9ffbacb3e54f4bef88777585 (diff)
downloadlul-bot-e3dba82cf3cdbdf5c0aad3d308013695a2074ecf.tar.gz
lul-bot-e3dba82cf3cdbdf5c0aad3d308013695a2074ecf.tar.bz2
lul-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.js17
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