Files
xiao/commands/edit-text/fancy.js
T
2020-04-09 14:37:24 -04:00

30 lines
750 B
JavaScript

const Command = require('../../structures/Command');
const { letterTrans } = require('custom-translate');
const dictionary = require('../../assets/json/fancy');
module.exports = class FancyCommand extends Command {
constructor(client) {
super(client, {
name: 'fancy',
group: 'edit-text',
memberName: 'fancy',
description: 'Converts text to fancy letters.',
args: [
{
key: 'text',
prompt: 'What text would you like to convert to fancy letters?',
type: 'string',
validate: text => {
if (letterTrans(text, dictionary).length < 2000) return true;
return 'Invalid text, your text is too long.';
}
}
]
});
}
run(msg, { text }) {
return msg.say(letterTrans(text, dictionary));
}
};