mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-23 18:05:01 +02:00
React on complete in airhorn
This commit is contained in:
@@ -37,6 +37,7 @@ module.exports = class AirhornCommand extends Command {
|
|||||||
const connection = await voiceChannel.join();
|
const connection = await voiceChannel.join();
|
||||||
const airhorn = sounds[Math.floor(Math.random() * sounds.length)];
|
const airhorn = sounds[Math.floor(Math.random() * sounds.length)];
|
||||||
const dispatcher = connection.play(path.join(__dirname, '..', '..', 'assets', 'sounds', 'airhorn', airhorn));
|
const dispatcher = connection.play(path.join(__dirname, '..', '..', 'assets', 'sounds', 'airhorn', airhorn));
|
||||||
|
await msg.react('🔉');
|
||||||
dispatcher.once('finish', () => voiceChannel.leave());
|
dispatcher.once('finish', () => voiceChannel.leave());
|
||||||
dispatcher.once('error', () => voiceChannel.leave());
|
dispatcher.once('error', () => voiceChannel.leave());
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
Reference in New Issue
Block a user