1.0.0 #253
@ -1 +1 @@
|
||||
Subproject commit cae0f428182f686872a0799790479e9900f06cf5
|
||||
Subproject commit 81021418c21d45cee54478ab5fd69f9ce7261644
|
@ -43,14 +43,14 @@ class AuthUserTransformer(TransformerABC):
|
||||
def _is_admin(user: User, bot: DiscordBotServiceABC, permissions: PermissionServiceABC):
|
||||
guild = bot.get_guild(user.server.discord_id)
|
||||
member = guild.get_member(user.discord_id)
|
||||
return permissions.is_member_technician(member)
|
||||
return permissions.is_member_admin(member)
|
||||
|
||||
@staticmethod
|
||||
@ServiceProviderABC.inject
|
||||
def _is_moderator(user: User, bot: DiscordBotServiceABC, permissions: PermissionServiceABC):
|
||||
guild = bot.get_guild(user.server.discord_id)
|
||||
member = guild.get_member(user.discord_id)
|
||||
return permissions.is_member_technician(member)
|
||||
return permissions.is_member_moderator(member)
|
||||
|
||||
@classmethod
|
||||
def to_dto(cls, db: AuthUser, password: str = None) -> AuthUserDTO:
|
||||
|
Loading…
Reference in New Issue
Block a user