Skip to content

Commit

Permalink
fix(message): check blocked by guild - really we should get proper oo…
Browse files Browse the repository at this point in the history
…pp in here
  • Loading branch information
Mitchell committed May 11, 2021
1 parent a249038 commit 59fe99f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Commands/Public/message.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
Expand Down

0 comments on commit 59fe99f

Please sign in to comment.