2018-09-22 18:27:06 +02:00
|
|
|
const { Command } = require('discord.js-commando');
|
|
|
|
const emojiCharacters = require('../../emojiCharacters');
|
2018-11-28 01:35:26 +01:00
|
|
|
const SelfReloadJSON = require('self-reload-json');
|
|
|
|
const blacklist = require('../../blacklist');
|
2018-09-22 18:35:43 +02:00
|
|
|
module.exports = class emoteSayCommand extends Command {
|
2018-09-22 18:27:06 +02:00
|
|
|
constructor(client) {
|
|
|
|
super(client, {
|
|
|
|
name: 'emotesay',
|
|
|
|
group: 'fun',
|
|
|
|
memberName: 'emotesay',
|
|
|
|
description: `repeat the text in dancing letters`,
|
|
|
|
args: [
|
|
|
|
{
|
|
|
|
key: 'text',
|
|
|
|
prompt: 'What do you want me to say',
|
|
|
|
type: 'string',
|
|
|
|
}
|
|
|
|
]
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
async run(message, { text }) {
|
2018-12-04 16:22:45 +01:00
|
|
|
let blacklistJson = new SelfReloadJSON('./json/blacklist.json');
|
2018-11-28 01:35:26 +01:00
|
|
|
if(blacklistJson[message.author.id])
|
|
|
|
return blacklist(blacklistJson[message.author.id] , message)
|
|
|
|
|
2018-09-23 20:01:07 +02:00
|
|
|
message.delete();
|
2018-09-22 18:27:06 +02:00
|
|
|
let emojiArray = [];
|
2018-09-28 16:16:35 +02:00
|
|
|
for (let i = 0; i < text.length; i++)
|
2018-10-05 11:37:05 +02:00
|
|
|
emojiArray[i] = emojiCharacters[text.toLowerCase().split('')[i]];
|
2018-09-23 19:33:53 +02:00
|
|
|
message.say(emojiArray.join(""))
|
2018-09-22 18:27:06 +02:00
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
};
|