PhpBotFramework  1.0.0
A framework for Telegram Bots' APIs.
Functions | Variables
State

Functions

DanySpin97\PhpBotFramework\Bot::getStatus ($default_status=-1)
 Get current user status from redis and set it in status variable. More...
 
 DanySpin97\PhpBotFramework\Bot::setStatus ($status)
 Set the status of the bot in both redis and $status. More...
 

Variables

 DanySpin97\PhpBotFramework\Bot::$status
 Status of the bot to handle data inserting and menu-like bot.
 

Detailed Description

Function Documentation

§ getStatus()

& DanySpin97\PhpBotFramework\Bot::getStatus (   $default_status = -1)

Get current user status from redis and set it in status variable.

Throw exception if redis connection is missing.

Parameters
$default_statusOptional. The default status to return in case there is no status for the current user.
Returns
The status for the current user, $default_language if missing.

§ setStatus()

DanySpin97\PhpBotFramework\Bot::setStatus (   $status)

Set the status of the bot in both redis and $status.

Throw exception if redis connection is missing.

Parameters
$statusThe new status of the bot.