fix warning message timeout

This commit is contained in:
Jan 2021-02-07 16:37:03 +01:00
parent c9d19e77ff
commit 35bbe61979

View file

@ -73,7 +73,7 @@ module.exports.run = () => {
} else if (awards[reaction.emoji.id]) {
let award = awards[reaction.emoji.id];
let noTimeout = (timeouts[user.id] && timeouts[user.id] < Date.now());
let noTimeout = (!timeouts[user.id] || timeouts[user.id] < Date.now());
let perms = message.channel.permissionsFor(user.id);
if (!perms.has('SEND_MESSAGES') || !perms.has('ADD_REACTIONS')) {
logger.warn(`${user.tag} => Ignoring reaction in #${message.channel.name}: User is missing permission`);