Merge pull request 'Fixed permission check' (#398) from dev into master
All checks were successful
Deploy dev on push / on-push-deploy_sh-edraft (push) Successful in 3m36s

Reviewed-on: sh-edraft.de/kd_discord_bot#398
This commit is contained in:
Sven Heidemann 2023-10-02 19:02:30 +02:00
commit b11cd6ebf0

View File

@ -50,10 +50,8 @@ class PermissionService(PermissionServiceABC):
return member is not None and member in self.get_admins(member.guild.id) return member is not None and member in self.get_admins(member.guild.id)
def is_member_moderator(self, member: discord.Member) -> bool: def is_member_moderator(self, member: discord.Member) -> bool:
return ( return member is not None and (
member is not None member in self.get_admins(member.guild.id) or member in self.get_moderators(member.guild.id)
and member in self.get_admins(member.guild.id)
or member in self.get_moderators(member.guild.id)
) )
def is_member_technician(self, member: discord.Member) -> bool: def is_member_technician(self, member: discord.Member) -> bool: