From 08922ef86c908b8459a9e8da3c7c59fe66e5dc45 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sun, 21 Mar 2021 19:07:54 -0400 Subject: [PATCH] Fix --- commands/voice/animalese.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/voice/animalese.js b/commands/voice/animalese.js index 9af9d5ee..d6203584 100644 --- a/commands/voice/animalese.js +++ b/commands/voice/animalese.js @@ -67,7 +67,7 @@ module.exports = class AnimaleseCommand extends Command { } if (this.client.dispatchers.has(msg.guild.id)) return msg.reply('I am already playing audio in this server.'); await reactIfAble(msg, this.client.user, LOADING_EMOJI_ID, '💬'); - const dispatcher = connection.play(this.animalese(text, pitch)); + const dispatcher = connection.play(Readable.from([this.animalese(text, pitch)])); this.client.dispatchers.set(msg.guild.id, dispatcher); dispatcher.once('finish', () => this.client.dispatchers.delete(msg.guild.id)); dispatcher.once('error', () => this.client.dispatchers.delete(msg.guild.id)); @@ -99,7 +99,7 @@ module.exports = class AnimaleseCommand extends Command { } const wav = new WaveFile(); wav.fromScratch(1, sampleFreq, '32', data); - return Readable.from([wav.toBuffer()]); + return wav.toBuffer(); } shortenWord(str) {