raito.plugins.roles.providers.sql.sqlite module

class raito.plugins.roles.providers.sql.sqlite.SQLiteRoleProvider(storage, session_factory=None)[исходный код]

Базовые классы: SQLAlchemyRoleProvider

SQLite-based role provider.

Required packages sqlalchemy[asyncio], aiosqlite package installed (pip install raito[sqlite])

Параметры:
  • storage (SQLAlchemyStorage)

  • session_factory (async_sessionmaker[AsyncSession] | None)

async set_role(bot_id, user_id, role_slug)[исходный код]

Set the role for a specific user.

Параметры:
  • bot_id (int) – The Telegram bot ID

  • user_id (int) – The Telegram user ID

  • role_slug (str) – The role slug to assign

Тип результата:

None

async remove_role(bot_id, user_id)[исходный код]

Remove the role for a specific user.

Параметры:
  • bot_id (int) – The Telegram bot ID

  • user_id (int) – The Telegram user ID

Тип результата:

None