diff --git a/.env.example b/.env.example index a0d83a4d..aa893d0b 100644 --- a/.env.example +++ b/.env.example @@ -26,6 +26,7 @@ FLANKER_EMOJI_ID= FRONT_LINE_EMOJI_ID= SUPPORT_EMOJI_ID= DAMAGE_EMOJI_ID= +LOADING_EMOJI_ID= # Dating info DATING_OFF= diff --git a/commands/voice/dec-talk.js b/commands/voice/dec-talk.js index 967bfcc7..8780765a 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 { LOADING_EMOJI_ID } = process.env; module.exports = class DECTalkCommand extends Command { constructor(client) { @@ -52,6 +53,9 @@ module.exports = class DECTalkCommand extends Command { return msg.reply(`I am not in a voice channel. Use ${usage} to fix that!`); } try { + if (msg.channel.permissionsFor(this.client.user).has(['ADD_REACTIONS', 'READ_MESSAGE_HISTORY'])) { + await msg.react(LOADING_EMOJI_ID); + } const { url } = await request .get('http://tts.cyzon.us/tts') .query({ text }); diff --git a/commands/voice/vocodes.js b/commands/voice/vocodes.js index 605844e7..b1cbcf83 100644 --- a/commands/voice/vocodes.js +++ b/commands/voice/vocodes.js @@ -51,6 +51,9 @@ module.exports = class VocodesCommand extends Command { return msg.reply(`I am not in a voice channel. Use ${usage} to fix that!`); } try { + if (msg.channel.permissionsFor(this.client.user).has(['ADD_REACTIONS', 'READ_MESSAGE_HISTORY'])) { + await msg.react(LOADING_EMOJI_ID); + } const { body } = await request .post('https://mumble.stream/speak_spectrogram') .send({ diff --git a/package.json b/package.json index 3466df97..30607bab 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiao", - "version": "119.34.1", + "version": "119.34.2", "description": "Your personal server companion.", "main": "Xiao.js", "scripts": {