A simple but useful class for working with json(file) database
All of your changes on properties will be saved automatically
User default data :
['step' => 'none', 'value' => '', 'phone_number' => '', 'first_active' => 0, 'last_active' => 0, 'referral' => null]
Group user default data :
['step' => 'none', 'value' => '', 'last_active' => 0, 'presence' => true, 'removed' => false, 'removed_by' => null, 'invite_link' => null, 'accepted_by' => null, 'invited_by' => null]
Others has default empty
Name | Type | Description | Kind |
---|---|---|---|
global | object | Global data of your database will be loaded here, It will always loaded | Static |
user | object | User data will be loaded here automatically, Will be loaded in Private chats. Will be loaded in Groups and SuperGroups only when user started bot in private chat | Static |
group | object | Group data will be loaded here automatically, Will be loaded in groups only. | Static |
supergroup | object | Supergroup data will be loaded here automatically, Will be loaded in Supergroups only. | Static |
group_user | object | User data in group will be loaded here automatically, Will be loaded in group and supergroups | Static |
channel | object | Channel data will be loaded here automatically, Will be loaded in Channel only. | Static |
See methods list : methods