Files
xiao/commands/textedit/zalgo.js
T
2017-04-25 02:37:14 +00:00

31 lines
937 B
JavaScript

const { Command } = require('discord.js-commando');
const zalgo = require('zalgolize');
module.exports = class ZalgoCommand extends Command {
constructor(client) {
super(client, {
name: 'zalgo',
group: 'textedit',
memberName: 'zalgo',
description: 'Zalgoizes Text.',
args: [{
key: 'text',
prompt: 'What text would you like to convert to zalgo?',
type: 'string',
validate: content => {
if (content.length < 500) {
return true;
}
return `Please keep your text under 500 characters, you have ${content.length}.`;
},
parse: text => zalgo(text)
}]
});
}
run(message, args) {
const { text } = args;
return message.say(`\u180E${text}`);
}
};