diff --git a/commands/general/emotesay.js b/commands/general/emotesay.js index 4abc529..b19e632 100644 --- a/commands/general/emotesay.js +++ b/commands/general/emotesay.js @@ -1,5 +1,6 @@ const { Command } = require('discord-akairo'); const emojiCharacters = require('../../emojiCharacters'); +const rand = require('../../rand.js'); class EmotesayCommand extends Command { constructor() { @@ -25,7 +26,9 @@ class EmotesayCommand extends Command { let text = args.text; if (!text) return; - + + text = rand.random(text, message); + message.delete(); let emojiArray = []; for (let i = 0; i < text.length; i++) diff --git a/commands/general/tts.js b/commands/general/tts.js index 82c0923..9b781f3 100644 --- a/commands/general/tts.js +++ b/commands/general/tts.js @@ -1,5 +1,6 @@ const { Command } = require('discord-akairo'); const textToSpeech = require('@google-cloud/text-to-speech'); +const rand = require('../../rand.js'); const gclient = new textToSpeech.TextToSpeechClient(); const fs = require('fs'); @@ -26,6 +27,8 @@ class TtsCommand extends Command { async exec(message, args) { let text = args.text; + text = rand.random(text, message); + // Construct the request const request = { input: { text: text }, diff --git a/commands/general/ttsvc.js b/commands/general/ttsvc.js index 7b4799f..6ca36da 100644 --- a/commands/general/ttsvc.js +++ b/commands/general/ttsvc.js @@ -1,5 +1,6 @@ const { Command } = require('discord-akairo'); const textToSpeech = require('@google-cloud/text-to-speech'); +const rand = require('../../rand.js'); const gclient = new textToSpeech.TextToSpeechClient(); const fs = require('fs'); @@ -26,6 +27,8 @@ class TtsvcCommand extends Command { async exec(message, args) { let text = args.text; + + text = rand.random(text, message); // Construct the request const request = {