mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-19 13:56:43 +02:00
Beep
This commit is contained in:
@@ -49,11 +49,11 @@ module.exports = class DECTalkCommand extends Command {
|
|||||||
await fs.writeFileAsync(file, body, { encoding: 'binary' });
|
await fs.writeFileAsync(file, body, { encoding: 'binary' });
|
||||||
await msg.react('🔉');
|
await msg.react('🔉');
|
||||||
const dispatcher = connection.playFile(file);
|
const dispatcher = connection.playFile(file);
|
||||||
dispatcher.once('end', async () => this.finish(file, channel, msg));
|
dispatcher.once('end', () => this.finish(file, channel, msg));
|
||||||
dispatcher.once('error', async () => this.finish(file, channel, msg, true));
|
dispatcher.once('error', () => this.finish(file, channel, msg, true));
|
||||||
return null;
|
return null;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
this.finish(file, channel, msg, true);
|
await this.finish(file, channel, msg, true);
|
||||||
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
|
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user