Files
xiao/commands/text-edit/shuffle.js
T
Daniel Odendahl Jr 218c8aa0fa Clean-ups
2017-08-16 16:06:06 +00:00

26 lines
538 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;
return msg.say(shuffle(text.split('')).join(''));
}
};