mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-16 08:22:22 +02:00
Only add april fools inhibitor if needed
This commit is contained in:
@@ -400,13 +400,14 @@ client.dispatcher.addInhibitor(msg => {
|
|||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
client.dispatcher.addInhibitor(msg => {
|
if (APRIL_FOOLS) {
|
||||||
if (APRIL_FOOLS !== 'true') return false;
|
client.dispatcher.addInhibitor(msg => {
|
||||||
if (client.isOwner(msg.author)) return false;
|
if (client.isOwner(msg.author)) return false;
|
||||||
const random = Math.floor(Math.random() * 2);
|
const random = Math.floor(Math.random() * 2);
|
||||||
if (random === 1) return msg.reply(aprilFoolsMsgs[Math.floor(Math.random() * aprilFoolsMsgs.length)]);
|
if (random === 1) return msg.reply(aprilFoolsMsgs[Math.floor(Math.random() * aprilFoolsMsgs.length)]);
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
client.on('commandError', (command, err) => client.logger.error(`[COMMAND:${command.name}]\n${err.stack}`));
|
client.on('commandError', (command, err) => client.logger.error(`[COMMAND:${command.name}]\n${err.stack}`));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user