2018-09-22 18:27:06 +02:00
|
|
|
const { Command } = require('discord.js-commando');
|
|
|
|
const emojiCharacters = require('../../emojiCharacters');
|
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 }) {
|
|
|
|
let textChar = text.split('')
|
|
|
|
let i = text.length;
|
|
|
|
let emojiArray = [];
|
|
|
|
message.delete();
|
|
|
|
for (i = 0; i < text.length; i++) {
|
|
|
|
emojiArray[i] = emojiCharacters[textChar[i]];
|
|
|
|
}
|
|
|
|
let finalText = emojiArray.join("");
|
|
|
|
message.say(finalText)
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
};
|