1.1.7 - #376 #375 #374 #377

Merged
edraft merged 24 commits from 1.1.7 into support 2023-09-28 18:12:58 +02:00
Showing only changes of commit 4c0a4bc1ae - Show all commits

View File

@ -20,6 +20,7 @@ from bot_data.model.known_user import KnownUser
from bot_data.model.level import Level
from bot_data.model.server import Server
from bot_data.model.server_config import ServerConfig
from bot_data.model.short_role_name import ShortRoleName
from bot_data.model.user import User
from bot_data.model.user_joined_game_server import UserJoinedGameServer
from bot_data.model.user_joined_server import UserJoinedServer
@ -184,6 +185,16 @@ class QueryABC(ObjectType):
access = True
break
elif type(element) == ShortRoleName:
element: ShortRoleName = element
for u in user.users:
u: User = u
guild = bot.get_guild(u.server.discord_id)
member = guild.get_member(u.discord_id)
if permissions.is_member_moderator(member) and u.server.id == element.server.id:
access = True
break
elif type(element) == dict and "key" in element and element["key"] in [e.value for e in FeatureFlagsEnum]:
for u in user.users:
u: User = u