This is better

This commit is contained in:
Daniel Odendahl Jr
2019-02-20 17:42:33 +00:00
parent 98155a86f1
commit 89d0057b90
+6 -6
View File
@@ -6,18 +6,18 @@ module.exports = class UnspoilerCommand extends Command {
name: 'unspoiler',
group: 'text-edit',
memberName: 'unspoiler',
description: 'Removes all spoilers from text.',
description: 'Removes all spoilers from a message.',
args: [
{
key: 'text',
prompt: 'What text would you like to unspoiler?',
type: 'string'
key: 'message',
prompt: 'What message would you like to unspoiler?',
type: 'message'
}
]
});
}
run(msg, { text }) {
return msg.say(text.replace(/\|\|.+\|\|/g, ''));
run(msg, { message }) {
return msg.say(message.content.replace(/\|\|(.+)\|\|/g, '$1'));
}
};