BPT\settings

Contain bpt library settings, All of them must be set during creation of BPT class.

Properties are BPT settings (all of them are optional except token)

Properties
Name Type Description Kind
token string Token of your bot, Its required to be filled Static
bot_id int bot numeric id, will be exported from token Static
name string Your desired name for bot, its useful for multi bot situation Static
logger bool Logger, we suggest to keep it on Static
log_size int Log size in MB value, when logger file reached this size, it will purge automatically Static
certificate string | CURLFile | null Set your certificate file location if you want use webhook on http urls, we do not suggest it Static
handler bool Update handler, we suggest to keep it on, we used this in our base file Static
security bool It will apply some security settings, its better to be on(true) in production Static
secure_folder bool It will apply some security setting in bot folder Static
multi bool It will use some tricks to be multi process, we do not suggesting it at all! Static
telegram_verify bool If its on(true),only telegram request aka webhook updates will process Static
cloudflare_verify bool If you are using cloudFlare cdn and you want telegram_verify option, turn this on Static
arvancloud_verify bool If you are using arvanCloud cdn and you want telegram_verify option, turn this on Static
skip_old_updates bool If you want to skip old updates in webhook or getUpdates, keep it on Static
secret string Library will use this to verify telegram webhook, You can set it or library will set it automatically Static
max_connection int Read more at webhook method in telegram class, In simple description : the maximum number of http connection to your server, upper mean more speed and more resource usage Static
base_url string base api telegram url; If you are not using local bot api server, dont touch it Static
down_url string same as base_url, If you are not using local bot api server, dont touch it Static
default_parse_mode string Default parse_mode, It will applied to every method that has parse_mode parameter, Only when parse_mode doesn't set when calling method Static
default_protect_content bool Default protect_content, It will applied to every method that has protect_content parameter, Only when protect_content doesn't set when calling method Static
forgot_time int It will use when you set forgot parameter in telegram methods, connection to telegram will closed after set value in millisecond Static
base_timeout int It will set this as base timeout for telegram methods, connection to telegram will closed after set value in millisecond(set this based on your provider, 300 almost work in anywhere) Static
receiver string | null How to receive updates, BPT\constants\receiver ::WEBHOOK for webhook and BPT\constants\receiver ::GETUPDATES for getupdate, Set it to null for disabling update receiver Static
allowed_updates array allowed update to be received, see update class for more detail Static
db array Setting related to db, its off by default Static
pay array Setting related to payments, its off by default Static

See methods list : methods

DB settings table
Name type Description Required
type string It could be BPT\constants\dbTypes::MYSQL or BPT\constants\dbTypes::JSON Yes
global array Only in BPT\constants\dbTypes::JSON, Set global default data here for example price of coins No
group array Only in BPT\constants\dbTypes::JSON, Set group default data here No
supergroup array Only in BPT\constants\dbTypes::JSON, Set supergroup default data here No
channel array Only in BPT\constants\dbTypes::JSON, Set channel default data here No
user array Only in BPT\constants\dbTypes::JSON, Set user default data here No
group_user array Only in BPT\constants\dbTypes::JSON, Set user default data in group here No
host string Only in BPT\constants\dbTypes::MYSQL, Set your database address here, default value is localhost No
port int Only in BPT\constants\dbTypes::MYSQL, Set your database pass here, default value is 3306 No
user string Only in BPT\constants\dbTypes::MYSQL, Set your database user here, you can set username instead of user, default value is root No
pass string Only in BPT\constants\dbTypes::MYSQL, Set your database pass here, you can set password instead of pass, default value is null aka empty No
dbname string Only in BPT\constants\dbTypes::MYSQL, Set your database name here Yes
auto_process bool Only in BPT\constants\dbTypes::MYSQL, Set this false if you dont want library process updates No
Pay settings table
Name type Description Required
crypto array Set this if you want to use crypto payments No
idpay array Set this if you want to use rial payments via idpay No
zarinpal array Set this if you want to use rial payments via zarinpal No
Crypto payment settings
Name type Description Required
api_key string Set your api_key in nowPayments here No
ipn_secret string Set your ipn_secret in nowPayments here No
idpay payment settings
Name type Description Required
api_key string Set your api_key in idpay here No
sandbox bool Set this if you want test mode(sandbox mode) No
zarinpal payment settings
Name type Description Required
merchant_id string Set your merchant_id from zarinpal here No
sandbox bool Set this if you want test mode(sandbox mode) No
zarin_gate bool Set this if you want zarin gate(kinda like smart gateway chooser) No