|
|
@ -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 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 = {
|
|
|
|