Reviewed-on: sh-edraft.de/kd_discord_bot#258 Reviewed-by: edraft-dev <dev.sven.heidemann@sh-edraft.de> #Closes #256
This commit is contained in:
commit
f56dbf8e2a
@ -124,28 +124,36 @@ class QueryABC(ObjectType):
|
|||||||
elif type(element) == User:
|
elif type(element) == User:
|
||||||
for u in user.users:
|
for u in user.users:
|
||||||
u: User = u
|
u: User = u
|
||||||
if u.id == element.id:
|
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):
|
||||||
access = True
|
access = True
|
||||||
break
|
break
|
||||||
|
|
||||||
elif type(element) == UserJoinedServer:
|
elif type(element) == UserJoinedServer:
|
||||||
for u in user.users:
|
for u in user.users:
|
||||||
u: User = u
|
u: User = u
|
||||||
if u.id == element.user.id:
|
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):
|
||||||
access = True
|
access = True
|
||||||
break
|
break
|
||||||
|
|
||||||
elif type(element) == UserJoinedVoiceChannel:
|
elif type(element) == UserJoinedVoiceChannel:
|
||||||
for u in user.users:
|
for u in user.users:
|
||||||
u: User = u
|
u: User = u
|
||||||
if u.id == element.user.id:
|
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):
|
||||||
access = True
|
access = True
|
||||||
break
|
break
|
||||||
|
|
||||||
elif type(element) == UserJoinedGameServer:
|
elif type(element) == UserJoinedGameServer:
|
||||||
for u in user.users:
|
for u in user.users:
|
||||||
u: User = u
|
u: User = u
|
||||||
if u.id == element.user.id:
|
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):
|
||||||
access = True
|
access = True
|
||||||
break
|
break
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user