mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-20 14:00:22 +02:00
Fix Dragon's Stupidity
This commit is contained in:
@@ -45,8 +45,8 @@ module.exports = class SoundboardCommand extends Command {
|
|||||||
try {
|
try {
|
||||||
const connection = await channel.join();
|
const connection = await channel.join();
|
||||||
const dispatcher = connection.playFile(path.join(__dirname, '..', '..', 'assets', 'sounds', `${sound}.mp3`));
|
const dispatcher = connection.playFile(path.join(__dirname, '..', '..', 'assets', 'sounds', `${sound}.mp3`));
|
||||||
dispatcher.once('end', channel.leave);
|
dispatcher.once('end', () => channel.leave());
|
||||||
dispatcher.once('error', channel.leave);
|
dispatcher.once('error', () => channel.leave());
|
||||||
return null;
|
return null;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
channel.leave();
|
channel.leave();
|
||||||
|
|||||||
Reference in New Issue
Block a user