raito.plugins.roles.providers.sql.postgresql module¶
- class raito.plugins.roles.providers.sql.postgresql.PostgreSQLRoleProvider(storage, session_factory=None)[исходный код]¶
Базовые классы:
SQLAlchemyRoleProviderPostgreSQL-based role provider.
Required packages
sqlalchemy[asyncio],asyncpgpackage installed (pip install raito[postgresql])- Параметры:
storage (SQLAlchemyStorage)
session_factory (async_sessionmaker[AsyncSession] | None)
- async set_role(bot_id, user_id, role_slug)[исходный код]¶
Set the role for a specific user.
- async remove_role(bot_id, user_id)[исходный код]¶
Remove the role for a specific user.