Improve DECTalk

This commit is contained in:
Dragon Fire
2020-10-29 00:16:09 -04:00
parent 5006e7008b
commit 27971b627f
2 changed files with 4 additions and 3 deletions
+3 -2
View File
@@ -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('🔉');
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "xiao",
"version": "119.34.2",
"version": "119.34.3",
"description": "Your personal server companion.",
"main": "Xiao.js",
"scripts": {