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

25 lines
511 B
JavaScript

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