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

24 lines
520 B
JavaScript

const Command = require('../../structures/Command');
module.exports = class UnspoilerCommand extends Command {
constructor(client) {
super(client, {
name: 'unspoiler',
group: 'edit-text',
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'));
}
};