Files
xiao/commands/text-edit/unspoiler.js
T
Daniel Odendahl Jr 89d0057b90 This is better
2019-02-20 17:42:33 +00:00

24 lines
517 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 a message.',
args: [
{
key: 'message',
prompt: 'What message would you like to unspoiler?',
type: 'message'
}
]
});
}
run(msg, { message }) {
return msg.say(message.content.replace(/\|\|(.+)\|\|/g, '$1'));
}
};