Files
xiao/commands/text-edit/reverse.js
T
Daniel Odendahl Jr 53e1d6a8ff eslint config aqua
2017-07-27 21:00:54 +00:00

26 lines
527 B
JavaScript

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