twtb.logic.shared.db
#
The package for the database system.
Submodules#
Package Contents#
Classes#
Main class for the data storage (aka database). |
|
Database configuration section. |
- class Database[source]#
Main class for the data storage (aka database).
- async subscribe_user(user: int, word: str) → bool[source]#
Subscribe user to the word.
- Returns:
Whether user was subscribed.
- async unsubscribe_user(user: int, word: str) → bool[source]#
Unsubscribe user from the word.
- Returns:
Whether word was removed.
- async add_channel(id: str) → bool[source]#
Add channel to our database.
- Returns:
Whether channel was added.
- async delete_channel(id: str) → bool[source]#
Delete channel from our database.
- Returns:
Whether channel was deleted.