Skip to content

Commit

Permalink
Fix code, kick ANY spammer now
Browse files Browse the repository at this point in the history
  • Loading branch information
ToothyDev committed Aug 22, 2024
1 parent 7768dde commit 835cc1f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cogs/events/members.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ async def on_member_update(self, member_old: discord.Member, member: discord.Mem
if member.bot: # If member is an ACTUAL bot
return

if await utils.spammer_kicker(member):
return

if await utils.userbot_kicker(member): # If member is a bot (95% accurate)
return
Expand All @@ -29,12 +31,10 @@ async def on_member_update(self, member_old: discord.Member, member: discord.Mem
if len(member_old.roles) <= 3 < len(member.roles):
if member.pending:
return
if not utils.spammer_kicker(member):
await utils.send_welcome_message(member)
await utils.send_welcome_message(member)
elif len(member.roles) > 3:
if member_old.pending and not member.pending:
if not utils.spammer_kicker(member):
await utils.send_welcome_message(member)
await utils.send_welcome_message(member)


def setup(bot):
Expand Down

0 comments on commit 835cc1f

Please sign in to comment.