Files
xiao/commands/text-edit/shuffle.js
T
Daniel Odendahl Jr 25baef55e4 ...
2017-08-15 22:14:01 +00:00

27 lines
580 B
JavaScript

const Command = require('../../structures/Command');
const { shuffle } = require('../../structures/Util');
module.exports = class ShuffleCommand extends Command {
constructor(client) {
super(client, {
name: 'shuffle',
group: 'text-edit',
memberName: 'shuffle',
description: 'Shuffles text.',
args: [
{
key: 'text',
prompt: 'What text would you like to shuffle?',
type: 'string'
}
]
});
}
run(msg, args) {
const { text } = args;
const converted = shuffle(text.split('')).join('');
return msg.say(`\u180E${converted}`);
}
};