Skip to content

Commit

Permalink
fix(message-parser): do not run commands when the bot has been timed …
Browse files Browse the repository at this point in the history
…out (#373)
  • Loading branch information
favna committed Feb 5, 2022
1 parent abe36ae commit 760227d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/listeners/command-handler/CoreMessageParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ export class CoreListener extends Listener<typeof Events.PreMessageParsed> {
const me = message.guild!.me ?? (message.client.id ? await message.guild!.members.fetch(message.client.id) : null);
if (!me) return false;

if (me.isCommunicationDisabled()) return false;

const channel = message.channel as GuildBasedChannelTypes;
return channel.permissionsFor(me).has(this.requiredPermissions, false);
}
Expand Down

0 comments on commit 760227d

Please sign in to comment.