Skip to content

Commit

Permalink
fix: newbie removal (for sure i swear)
Browse files Browse the repository at this point in the history
  • Loading branch information
1ukastesar authored and solumath committed Sep 19, 2024
1 parent a9f1572 commit e366196
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions features/verification.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,12 +315,9 @@ async def clear_host_roles(self, inter: disnake.ApplicationCommandInteraction):
"""Removes host roles (Host, Zajemce o studium, Verify)"""
guild = self.bot.get_guild(config.guild_id)
member = inter.user if isinstance(inter.user, disnake.Member) else guild.get_member(inter.user.id)
host = disnake.utils.get(guild.roles, name="Host")

if host not in member.roles:
return

newbie = disnake.utils.get(guild.roles, id=config.newbie_role)
host = disnake.utils.get(guild.roles, name="Host")
verify = disnake.utils.get(guild.roles, name="Verify")
zajemce = disnake.utils.get(guild.roles, name="ZajemceoStudium")
newbie = disnake.utils.get(guild.roles, id=config.newbie_role)
await member.remove_roles(host, verify, zajemce, newbie, reason="Verify user")
await member.remove_roles(host, newbie, verify, zajemce, reason="Verify user")

0 comments on commit e366196

Please sign in to comment.