mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-11 15:57:50 +02:00
34 lines
1016 B
JavaScript
34 lines
1016 B
JavaScript
const Command = require('../../structures/Command');
|
|
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: (text) => {
|
|
if (text.length < 500) {
|
|
return true;
|
|
} else {
|
|
return 'Invalid Text. Text must be under 500 characters.';
|
|
}
|
|
},
|
|
parse: (text) => zalgo(text)
|
|
}
|
|
]
|
|
});
|
|
}
|
|
|
|
run(msg, args) {
|
|
const { text } = args;
|
|
return msg.say(`\u180E${text}`);
|
|
}
|
|
};
|