Skip to content

Commit

Permalink
[Captcha] fix permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
japandotorg committed Oct 25, 2023
1 parent 903088c commit dfb0d5e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions captcha/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,12 +279,14 @@ async def on_message(self, message: discord.Message) -> None:
return
if await self.bot.cog_disabled_in_guild(self, message.guild):
return
if not await self.config.guild(message.guild).toggle():
return

if (
not message.guild.me.guild_permissions.kick_members
or message.guild.me.guild_permissions.manage_roles
or message.guild.me.guild_permissions.embed_links
or message.guild.me.guild_permissions.attach_files
or not message.guild.me.guild_permissions.manage_roles
or not message.guild.me.guild_permissions.embed_links
or not message.guild.me.guild_permissions.attach_files
):
await self.config.guild(message.guild).toggle.set(False)
log.info(f"Disabled captcha verification due to missing permissions.")
Expand Down

0 comments on commit dfb0d5e

Please sign in to comment.