const { Command } = require('discord.js-commando'); const emoji = require('emoji-random'); module.exports = class ResumeVoice extends Command { constructor(client) { super(client, { name: 'resume', aliases: ['unpause'], group: 'voice', memberName: 'resume', description: 'Resumes the soundtrack if paused.', guildOnly: true, examples: ['msb!resume', 'msb!unpause'] }); } run(msg) { var voiceChannel = msg.member.voice.channel; if (!voiceChannel) return msg.reply('Join a channel and try again. ' + emoji.random()); if ( typeof msg.guild.musicData.songDispatcher == 'undefined' || msg.guild.musicData.songDispatcher == null ) { return msg.reply('The soundtrack isn\'t playing right now. ' + emoji.random()); } msg.say('Soundtrack resumed :play_pause:'); msg.guild.musicData.songDispatcher.resume(); } };