Unspoiler command

This commit is contained in:
Daniel Odendahl Jr
2019-02-20 17:41:03 +00:00
parent 6bdb4399de
commit 98155a86f1
3 changed files with 26 additions and 2 deletions
+23
View File
@@ -0,0 +1,23 @@
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, ''));
}
};