From 59fe99f906a6e7a09f117c8213ef560a1caa4f1b Mon Sep 17 00:00:00 2001 From: Mitchell Date: Wed, 12 May 2021 01:03:14 +0200 Subject: [PATCH] fix(message): check blocked by guild - really we should get proper oopp in here --- Commands/Public/message.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Commands/Public/message.js b/Commands/Public/message.js index a8124400..34512f6e 100644 --- a/Commands/Public/message.js +++ b/Commands/Public/message.js @@ -39,8 +39,8 @@ module.exports = async(client, msg, suffix) => { if (cooldown && cooldown.time > time && !msg.author.support) return msg.channel.send({ embed: { color: config.colors.error, title: "Message cooldown", description: `Not so quick... you're under cooldown for another ${Math.round((cooldown.time - time) / 1000, 1)}s`, footer: { text: "Keep in mind that spamming a mailbox will result in a strike/blacklist." } } }); else msg.author.cooldown = "message"; - const fromBlocked = fromNumberDoc.blocked && fromNumberDoc.blocked.includes(toNumberDoc.channel); - const toBlocked = toNumberDoc.blocked && toNumberDoc.blocked.includes(fromNumberDoc.channel); + const fromBlocked = fromNumberDoc.blocked && fromNumberDoc.blocked.includes(toNumberDoc.guild); + const toBlocked = toNumberDoc.blocked && toNumberDoc.blocked.includes(fromNumberDoc.guild); if (fromBlocked || toBlocked) return msg.channel.send({ embed: { color: config.colors.error, description: `Could not send a message to \`${toNumberDoc.id}\`.`} }) await r.table("Accounts").get(msg.author.id).update({ balance: account.balance });