React on complete in airhorn

This commit is contained in:
Dragon Fire
2020-05-04 23:03:00 -04:00
parent e9e031fb92
commit 799d6084ea
+1
View File
@@ -37,6 +37,7 @@ module.exports = class AirhornCommand extends Command {
const connection = await voiceChannel.join();
const airhorn = sounds[Math.floor(Math.random() * sounds.length)];
const dispatcher = connection.play(path.join(__dirname, '..', '..', 'assets', 'sounds', 'airhorn', airhorn));
await msg.react('🔉');
dispatcher.once('finish', () => voiceChannel.leave());
dispatcher.once('error', () => voiceChannel.leave());
return null;