Longman\TelegramBot\Conversation::__construct PHP Method

__construct() public method

Conversation contructor to initialize a new conversation
public __construct ( integer $user_id, integer $chat_id, string $command = null )
$user_id integer
$chat_id integer
$command string
    public function __construct($user_id, $chat_id, $command = null)
    {
        $this->user_id = $user_id;
        $this->chat_id = $chat_id;
        $this->command = $command;
        //Try to load an existing conversation if possible
        if (!$this->load() && $command !== null) {
            //A new conversation start
            $this->start();
        }
    }