Добавлено получение id роли пользователя

This commit is contained in:
Armatik 2024-04-25 15:42:17 +03:00
parent cfaffd337d
commit 192b2ed51c

View File

@ -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