forked from Supositware/Haha-Yes
test
This commit is contained in:
parent
1dec1f54ea
commit
d0fcc8c101
1 changed files with 32 additions and 0 deletions
32
commands/fun/tts.js
Normal file
32
commands/fun/tts.js
Normal file
|
@ -0,0 +1,32 @@
|
|||
const { Command } = require('discord.js-commando');
|
||||
const speak = require('simple-tts');
|
||||
const SelfReloadJSON = require('self-reload-json');
|
||||
|
||||
|
||||
module.exports = class BadMemeCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'tts',
|
||||
group: 'fun',
|
||||
memberName: 'tts',
|
||||
description: `Return what you type in a tts file`,
|
||||
ownerOnly: true,
|
||||
|
||||
args: [
|
||||
{
|
||||
key: 'text',
|
||||
prompt: 'What do you want to be said',
|
||||
type: 'string',
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
async run(message, { text }) {
|
||||
let blacklistJson = new SelfReloadJSON('./json/blacklist.json');
|
||||
if(blacklistJson[message.author.id])
|
||||
return blacklist(blacklistJson[message.author.id] , message)
|
||||
|
||||
speak(text, {format:'mp3', filename:'./tts'});
|
||||
message.say({files: ['./tts.mp3']})
|
||||
}}
|
Loading…
Reference in a new issue