Longman\TelegramBot\Entities\Message::__construct PHP Method

__construct() public method

Message constructor
public __construct ( array $data, string $bot_name = '' )
$data array
$bot_name string
    public function __construct(array $data, $bot_name = '')
    {
        //Retro-compatibility
        if (isset($data['new_chat_participant'])) {
            $data['new_chat_member'] = $data['new_chat_participant'];
            unset($data['new_chat_participant']);
        }
        if (isset($data['left_chat_participant'])) {
            $data['left_chat_member'] = $data['left_chat_participant'];
            unset($data['left_chat_participant']);
        }
        parent::__construct($data, $bot_name);
    }