diff --git a/src/modules/standard/roles/api.py b/src/modules/standard/roles/roles.py similarity index 76% rename from src/modules/standard/roles/api.py rename to src/modules/standard/roles/roles.py index 1a76e63..928abfa 100644 --- a/src/modules/standard/roles/api.py +++ b/src/modules/standard/roles/roles.py @@ -41,3 +41,16 @@ class Roles: return self.bot case _: raise ValueError(f"Нет роли с id={role_id}") + + async def get_user_permission(self, user_id): + match get_user_role(user_id): + case self.admin_role_id: + return self.admin + case self.moderator_role_id: + return self.moderator + case self.user_role_id: + return self.user + case self.bot_role_id: + return self.bot + case _: + return None