master #475

Closed
edraft wants to merge 60 commits from master into dev
2 changed files with 6 additions and 0 deletions
Showing only changes of commit 521a063fca - Show all commits

View File

@ -36,6 +36,8 @@ class AuthUserTransformer(TransformerABC):
def _is_technician(user: User, bot: DiscordBotServiceABC, permissions: PermissionServiceABC):
guild = bot.get_guild(user.server.discord_id)
member = guild.get_member(user.discord_id)
if member is None:
return permissions.is_member_technician_by_id(user.discord_id)
return permissions.is_member_technician(member)
@staticmethod

View File

@ -19,3 +19,7 @@ class PermissionServiceABC(ABC):
@abstractmethod
def is_member_technician(self, member: discord.Member) -> bool:
pass
@abstractmethod
def is_member_technician_by_id(self, member_id: int) -> bool:
pass