Page MenuHomePhabricator (Chris)

CallbackqueryCommand.php
No OneTemporary

Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None

CallbackqueryCommand.php

<?php
/**
* This file is part of the TelegramBot package.
*
* (c) Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Longman\TelegramBot\Commands\SystemCommands;
use Longman\TelegramBot\Commands\SystemCommand;
use Longman\TelegramBot\Request;
/**
* Callback query command
*/
class CallbackqueryCommand extends SystemCommand
{
/**#@+
* {@inheritdoc}
*/
protected $name = 'callbackquery';
protected $description = 'Reply to callback query';
protected $version = '1.0.0';
/**#@-*/
/**
* {@inheritdoc}
*/
public function execute()
{
$update = $this->getUpdate();
$callback_query = $update->getCallbackQuery();
$callback_query_id = $callback_query->getId();
$data['callback_query_id'] = $callback_query_id;
$data['text'] = 'Hello world!';
$data['show_alert'] = true;
return Request::answerCallbackQuery($data);
}
}

File Metadata

Mime Type
text/x-php
Expires
Sun, Nov 15, 3:36 PM (1 d, 21 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
151555
Default Alt Text
CallbackqueryCommand.php (1 KB)

Event Timeline