Fixed can_user_see_element #272

This commit is contained in:
Sven Heidemann 2023-03-28 15:42:07 +02:00
parent 75ad07477a
commit cb4f8d870c

View File

@ -135,7 +135,7 @@ class QueryABC(ObjectType):
u: User = u u: User = u
guild = bot.get_guild(u.server.discord_id) guild = bot.get_guild(u.server.discord_id)
member = guild.get_member(u.discord_id) member = guild.get_member(u.discord_id)
if u.id == element.id or permissions.is_member_moderator(member): if u.id == element.user.id or permissions.is_member_moderator(member):
access = True access = True
break break
@ -144,7 +144,7 @@ class QueryABC(ObjectType):
u: User = u u: User = u
guild = bot.get_guild(u.server.discord_id) guild = bot.get_guild(u.server.discord_id)
member = guild.get_member(u.discord_id) member = guild.get_member(u.discord_id)
if u.id == element.id or permissions.is_member_moderator(member): if u.id == element.user.id or permissions.is_member_moderator(member):
access = True access = True
break break
@ -153,7 +153,7 @@ class QueryABC(ObjectType):
u: User = u u: User = u
guild = bot.get_guild(u.server.discord_id) guild = bot.get_guild(u.server.discord_id)
member = guild.get_member(u.discord_id) member = guild.get_member(u.discord_id)
if u.id == element.id or permissions.is_member_moderator(member): if u.id == element.user.id or permissions.is_member_moderator(member):
access = True access = True
break break