diff options
| author | Andrew Lee <alee14498@protonmail.com> | 2020-07-22 20:19:45 -0400 |
|---|---|---|
| committer | Andrew Lee <alee14498@protonmail.com> | 2020-07-22 20:19:45 -0400 |
| commit | 6b5aba8d91870d169627e0e960965aad568aa3ab (patch) | |
| tree | 089530f405d5ce6fd8787043d9c22c63fdeb3239 | |
| parent | 8b08e5cf61c84c1a1490f13ad6124619c5d48db4 (diff) | |
| download | DLAP-6b5aba8d91870d169627e0e960965aad568aa3ab.tar.gz DLAP-6b5aba8d91870d169627e0e960965aad568aa3ab.tar.bz2 DLAP-6b5aba8d91870d169627e0e960965aad568aa3ab.zip | |
Added resume and pause command
| -rw-r--r-- | README.md | 2 | ||||
| -rw-r--r-- | bot.js | 14 |
2 files changed, 14 insertions, 2 deletions
@@ -36,6 +36,8 @@ about - About the bot. Bot Owner Only -------------- join - Joins voice chat. +resume - Resumes music. +pause - Pauses music. skip - Skips the audio track. leave - Leaves voice chat. stop - Stops bot. @@ -93,7 +93,7 @@ client.on('message', async msg => { // Public allowed commands if (command == 'help') { - if (!msg.guild.member(client.user).hasPermission('EMBED_LINKS')) return msg.reply('ERROR: This bot doesn\'t have the permission to send embed links please enable them to use the full help.'); + if (!msg.guild.member(client.user).hasPermission('EMBED_LINKS')) return msg.reply('**ERROR: This bot doesn\'t have the permission to send embed links please enable them to use the full help.**'); const helpEmbed = new Discord.MessageEmbed() .setAuthor(`${client.user.username} Help`) .setDescription(`Currently playing \`${audio}\`.`) @@ -115,7 +115,6 @@ client.on('message', async msg => { if (command == 'playing') { msg.channel.send('Currently playing `' + audio + '`.'); } - if (command == 'about') { msg.channel.send('The bot code was created by Andrew Lee (Alee#4277). Written in Discord.JS and licensed with GPL-3.0.'); @@ -131,6 +130,16 @@ client.on('message', async msg => { playAudio(); } + if (command == 'resume') { + msg.reply('Resuming music.'); + dispatcher.resume(); + } + + if (command == 'pause') { + msg.reply('Pausing music.'); + dispatcher.pause(); + } + if (command == 'skip') { msg.reply('Skipping `' + audio + '`...'); dispatcher.pause(); @@ -150,6 +159,7 @@ client.on('message', async msg => { if (command == 'stop') { await msg.reply('Powering off...'); console.log('Powering off...'); + dispatcher.destroy(); client.destroy(); process.exit(0); } |
