Merge pull request 'Fixed can_user_see_element #272' (#273) from #272 into 1.0.1

Reviewed-on: sh-edraft.de/kd_discord_bot#273
Reviewed-by: Ebola-Chan <nick.jungmann@gmail.com>
Closes #272
This commit is contained in:
Sven Heidemann 2023-03-28 23:29:35 +02:00
commit cf69436168

View File

@ -135,7 +135,7 @@ class QueryABC(ObjectType):
u: User = u
guild = bot.get_guild(u.server.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
break
@ -144,7 +144,7 @@ class QueryABC(ObjectType):
u: User = u
guild = bot.get_guild(u.server.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
break
@ -153,7 +153,7 @@ class QueryABC(ObjectType):
u: User = u
guild = bot.get_guild(u.server.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
break