diff options
Diffstat (limited to 'commands/voice/resume.js')
| -rw-r--r-- | commands/voice/resume.js | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/commands/voice/resume.js b/commands/voice/resume.js new file mode 100644 index 0000000..62124e3 --- /dev/null +++ b/commands/voice/resume.js @@ -0,0 +1,28 @@ +const { Command } = require('discord.js-commando'); + +module.exports = class ResumeVoice extends Command { + constructor(client) { + super(client, { + name: 'resumes', + group: 'voice', + memberName: 'resumes', + description: 'resumes music if there is any stopped', + guildOnly: true + }); + } + run(msg) { + var voiceChannel = msg.member.voice.channel; + if (!voiceChannel) return msg.reply('join a channel and try again'); + + if ( + typeof msg.guild.musicData.songDispatcher == 'undefined' || + msg.guild.musicData.songDispatcher == null + ) { + return msg.reply('there isn\'t a song playing right now lol'); + } + + msg.say('song resumed :play_pause:'); + + msg.guild.musicData.songDispatcher.resume(); + } +};
\ No newline at end of file |