version: 2.1.3







dataSave

save data in database, NOTE : for now , only work on json database

Parameters

key string The key you want to save it in database Yes
value mixed The value you want to save it in database Yes
type string type of chat , must be one of these : private,group,supergroup,channel Optional(Caught by catchFields method)
id int user or chat id for save data in it Optional(Caught by catchFields method)

Method errors

ErrorNamedescription
key parameter not found parameter key not founded , set it like example
value parameter not found parameter value not founded , set it like example
key most be string key parameter most be string
id not found id not found in BPT database
only work on json db this method only work in json db type

Method examples

$this->dataSave(['key'=>'user_y_coin','value'=>'12345','type'=>'private','id'=>'123456789']);
$this->dataSave(['key'=>'user_x_coin','value'=>'56789']);

Method alices

There is no alices

Method output :

Boolean