mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Update
This commit is contained in:
@@ -42,8 +42,8 @@ module.exports = class SoundboardCommand extends Command {
|
||||
if (this.client.voiceConnections.has(channel.guild.id)) return msg.reply('I am already playing a sound.');
|
||||
try {
|
||||
const connection = await channel.join();
|
||||
const dispatcher = connection.playFile(path.join(__dirname, '..', '..', 'assets', 'sounds', sounds[sound]));
|
||||
dispatcher.once('end', () => channel.leave());
|
||||
const dispatcher = connection.play(path.join(__dirname, '..', '..', 'assets', 'sounds', sounds[sound]));
|
||||
dispatcher.once('finish', () => channel.leave());
|
||||
dispatcher.once('error', () => channel.leave());
|
||||
return null;
|
||||
} catch (err) {
|
||||
|
||||
@@ -38,8 +38,8 @@ module.exports = class DECTalkCommand extends Command {
|
||||
const data = await snekfetch
|
||||
.get('http://tts.cyzon.us/tts', { followRedirects: false })
|
||||
.query({ text });
|
||||
const dispatcher = connection.playArbitraryInput(`http://tts.cyzon.us${data.headers.location}`);
|
||||
dispatcher.once('end', () => channel.leave());
|
||||
const dispatcher = connection.play(`http://tts.cyzon.us${data.headers.location}`);
|
||||
dispatcher.once('finish', () => channel.leave());
|
||||
dispatcher.once('error', () => channel.leave());
|
||||
return null;
|
||||
} catch (err) {
|
||||
|
||||
Reference in New Issue
Block a user