can use the random thingy
This commit is contained in:
parent
2cf6d9543b
commit
d66fef2b55
3 changed files with 10 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
||||||
const { Command } = require('discord-akairo');
|
const { Command } = require('discord-akairo');
|
||||||
const emojiCharacters = require('../../emojiCharacters');
|
const emojiCharacters = require('../../emojiCharacters');
|
||||||
|
const rand = require('../../rand.js');
|
||||||
|
|
||||||
class EmotesayCommand extends Command {
|
class EmotesayCommand extends Command {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
@ -26,6 +27,8 @@ class EmotesayCommand extends Command {
|
||||||
if (!text)
|
if (!text)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
text = rand.random(text, message);
|
||||||
|
|
||||||
message.delete();
|
message.delete();
|
||||||
let emojiArray = [];
|
let emojiArray = [];
|
||||||
for (let i = 0; i < text.length; i++)
|
for (let i = 0; i < text.length; i++)
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
const { Command } = require('discord-akairo');
|
const { Command } = require('discord-akairo');
|
||||||
const textToSpeech = require('@google-cloud/text-to-speech');
|
const textToSpeech = require('@google-cloud/text-to-speech');
|
||||||
|
const rand = require('../../rand.js');
|
||||||
const gclient = new textToSpeech.TextToSpeechClient();
|
const gclient = new textToSpeech.TextToSpeechClient();
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
|
|
||||||
|
@ -26,6 +27,8 @@ class TtsCommand extends Command {
|
||||||
async exec(message, args) {
|
async exec(message, args) {
|
||||||
let text = args.text;
|
let text = args.text;
|
||||||
|
|
||||||
|
text = rand.random(text, message);
|
||||||
|
|
||||||
// Construct the request
|
// Construct the request
|
||||||
const request = {
|
const request = {
|
||||||
input: { text: text },
|
input: { text: text },
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
const { Command } = require('discord-akairo');
|
const { Command } = require('discord-akairo');
|
||||||
const textToSpeech = require('@google-cloud/text-to-speech');
|
const textToSpeech = require('@google-cloud/text-to-speech');
|
||||||
|
const rand = require('../../rand.js');
|
||||||
const gclient = new textToSpeech.TextToSpeechClient();
|
const gclient = new textToSpeech.TextToSpeechClient();
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
|
|
||||||
|
@ -27,6 +28,8 @@ class TtsvcCommand extends Command {
|
||||||
async exec(message, args) {
|
async exec(message, args) {
|
||||||
let text = args.text;
|
let text = args.text;
|
||||||
|
|
||||||
|
text = rand.random(text, message);
|
||||||
|
|
||||||
// Construct the request
|
// Construct the request
|
||||||
const request = {
|
const request = {
|
||||||
input: { text: text },
|
input: { text: text },
|
||||||
|
|
Loading…
Reference in a new issue