models/telegram_db.py¶
models.telegram_db ¶
TelegramDB
TelegramDB ¶
Bases: DBBase
TelegramDB Collection
Source code in models/telegram_db.py
add ¶
save data
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
dict
|
The data to insert / update. |
required |
The data's struct
Struct
_id
: telegram id.added
: Added time in datatime.first_name
: First name.id
: telegram id.is_bot
:bool
.language_code
: Language in ISO 639.uid
: Mapping to our user id.username
: User name.
TODO
Need refactor in pydantic.