mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-17 21:40:51 +02:00
Fix unspoiler nothing, Upgrade Yu-Gi-Oh API
This commit is contained in:
@@ -4,6 +4,7 @@ module.exports = class UnspoilerCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'unspoiler',
|
||||
aliases: ['unspoil'],
|
||||
group: 'edit-text',
|
||||
memberName: 'unspoiler',
|
||||
description: 'Removes all spoilers from a message.',
|
||||
@@ -18,6 +19,8 @@ module.exports = class UnspoilerCommand extends Command {
|
||||
}
|
||||
|
||||
run(msg, { message }) {
|
||||
return msg.say(message.content.replace(/\|\|([^|]+)\|\|/g, '$1'));
|
||||
const unspoiled = message.content.replace(/\|\|([^|]+)\|\|/g, '$1');
|
||||
if (!unspoiled.trim()) return msg.say('_ _');
|
||||
return msg.say(unspoiled);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user