2018-12-30 01:20:24 +01:00
|
|
|
const { Command } = require('discord-akairo');
|
|
|
|
const emojiCharacters = require('../../emojiCharacters');
|
2019-02-08 19:06:23 +01:00
|
|
|
const rand = require('../../rand.js');
|
2018-12-30 01:20:24 +01:00
|
|
|
|
|
|
|
class EmotesayCommand extends Command {
|
2019-01-02 08:09:45 +01:00
|
|
|
constructor() {
|
|
|
|
super('emotesay', {
|
|
|
|
aliases: ['emotesay', 'esay'],
|
|
|
|
category: 'general',
|
|
|
|
args: [
|
|
|
|
{
|
|
|
|
id: 'text',
|
2019-01-10 20:45:29 +01:00
|
|
|
type: 'string',
|
|
|
|
match: 'rest'
|
2019-01-02 08:09:45 +01:00
|
|
|
}
|
|
|
|
],
|
|
|
|
description: {
|
2018-12-30 01:20:24 +01:00
|
|
|
content: 'Replace the text you send with dancing letters',
|
|
|
|
usage: '[text]',
|
|
|
|
examples: ['Hello']
|
|
|
|
}
|
2019-01-02 08:09:45 +01:00
|
|
|
});
|
|
|
|
}
|
2018-12-30 01:20:24 +01:00
|
|
|
|
2019-01-02 08:09:45 +01:00
|
|
|
async exec(message, args) {
|
|
|
|
let text = args.text;
|
2019-01-02 18:45:53 +01:00
|
|
|
if (!text)
|
|
|
|
return;
|
2019-02-08 19:06:23 +01:00
|
|
|
|
|
|
|
text = rand.random(text, message);
|
|
|
|
|
2019-01-02 08:09:45 +01:00
|
|
|
message.delete();
|
|
|
|
let emojiArray = [];
|
|
|
|
for (let i = 0; i < text.length; i++)
|
|
|
|
emojiArray[i] = emojiCharacters[text.toLowerCase().split('')[i]];
|
|
|
|
message.channel.send(emojiArray.join(''));
|
|
|
|
}
|
2018-12-30 01:20:24 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = EmotesayCommand;
|