Files
xiao/commands/text-edit/unspoiler.js
T
Daniel Odendahl Jr 98155a86f1 Unspoiler command
2019-02-20 17:41:03 +00:00

24 lines
487 B
JavaScript

const Command = require('../../structures/Command');
module.exports = class UnspoilerCommand extends Command {
constructor(client) {
super(client, {
name: 'unspoiler',
group: 'text-edit',
memberName: 'unspoiler',
description: 'Removes all spoilers from text.',
args: [
{
key: 'text',
prompt: 'What text would you like to unspoiler?',
type: 'string'
}
]
});
}
run(msg, { text }) {
return msg.say(text.replace(/\|\|.+\|\|/g, ''));
}
};