forked from Supositware/Haha-Yes
fixed
This commit is contained in:
parent
09c5057366
commit
fc4f96908a
1 changed files with 15 additions and 15 deletions
|
@ -73,13 +73,13 @@ class samvcCommand extends Command {
|
|||
},
|
||||
}).then(async (result) => {
|
||||
const outputFilename = './samvc.mp3';
|
||||
fs.writeFileSync(outputFilename, result.data);
|
||||
|
||||
fs.writeFile(outputFilename, result.data, async function(err) {
|
||||
if (err) console.error(err);
|
||||
const voiceChannel = message.member.voice.channel;
|
||||
if (!voiceChannel) return message.say('Please enter a voice channel first.');
|
||||
try {
|
||||
const connection = await voiceChannel.join();
|
||||
const dispatcher = connection.play('./samvc.wav');
|
||||
const dispatcher = connection.play('./dectalkvc.wav');
|
||||
dispatcher.once('finish', () => voiceChannel.leave());
|
||||
dispatcher.once('error', () => voiceChannel.leave());
|
||||
return null;
|
||||
|
@ -88,7 +88,7 @@ class samvcCommand extends Command {
|
|||
return message.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue