From 9fe0d1347f3377f403d5ff701bb9c01d326a26e8 Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Mon, 20 Mar 2017 04:24:20 +0000 Subject: [PATCH] Add Reactions to Soundboard --- commands/random/soundboard.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/commands/random/soundboard.js b/commands/random/soundboard.js index 364a5768..abde50e0 100644 --- a/commands/random/soundboard.js +++ b/commands/random/soundboard.js @@ -19,8 +19,8 @@ class SoundBoardCommand extends commando.Command { } console.log("[Command] " + message.content); if(message.channel.type !== 'dm') { - if(!message.channel.permissionsFor(this.client.user).hasPermission(['CONNECT', 'SPEAK'])) { - message.channel.send(':x: Error! In order to do this command, you must give me the permissions to "Connect" and "Speak"!'); + if(!message.channel.permissionsFor(this.client.user).hasPermission(['CONNECT', 'SPEAK', 'ADD_REACTIONS'])) { + message.channel.send(':x: Error! In order to do this command, you must give me the permissions to "Connect" and "Speak", as well as the permission to Add Reactions!'); } else { let voiceChannel = message.member.voiceChannel; if (!voiceChannel) { @@ -43,8 +43,10 @@ class SoundBoardCommand extends commando.Command { voiceChannel.join().then(connnection => { let stream = sounds.paths[soundToPlay]; let dispatcher = connnection.playStream(stream); + message.react('🔊'); dispatcher.on('end', () => { voiceChannel.leave(); + message.react('✅'); }); }); }