diff --git a/commands/voice/dec-talk.js b/commands/voice/dec-talk.js index 8780765a..af127639 100644 --- a/commands/voice/dec-talk.js +++ b/commands/voice/dec-talk.js @@ -1,5 +1,6 @@ const Command = require('../../structures/Command'); const request = require('node-superfetch'); +const { Readable } = require('stream'); const { LOADING_EMOJI_ID } = process.env; module.exports = class DECTalkCommand extends Command { @@ -56,10 +57,10 @@ module.exports = class DECTalkCommand extends Command { if (msg.channel.permissionsFor(this.client.user).has(['ADD_REACTIONS', 'READ_MESSAGE_HISTORY'])) { await msg.react(LOADING_EMOJI_ID); } - const { url } = await request + const { body } = await request .get('http://tts.cyzon.us/tts') .query({ text }); - connection.play(url); + connection.play(Readable.from([body])); if (msg.channel.permissionsFor(this.client.user).has(['ADD_REACTIONS', 'READ_MESSAGE_HISTORY'])) { await msg.react('🔉'); } diff --git a/package.json b/package.json index 30607bab..8a12f933 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiao", - "version": "119.34.2", + "version": "119.34.3", "description": "Your personal server companion.", "main": "Xiao.js", "scripts": {