-
-
Notifications
You must be signed in to change notification settings - Fork 965
Closed
Description
Hi guys, thanks for this awesome API for Telegram BOT.
I have a problem when i try to execute a command in CallbackqueryCommand class.
When i click on Inline button nothing is happening.
It's very strange because if i use executeCommand function on my other own command, it works fine.
This is my code:
//StartCommand
[....]
$inline_keyboard = [
new InlineKeyboardButton(['text' => "Add Category", 'callback_data' => 'add']),
new InlineKeyboardButton(['text' => "Help", 'callback_data' => 'help'])
];
$data = [
'chat_id' => $chat_id,
'text' => $text,
'reply_markup' => new InlineKeyboardMarkup(['inline_keyboard' => [$inline_keyboard]]),
'parse_mode' => "MARKDOWN"
];
[....]
//CallBackQueryCommand
[....]
$update = $this->getUpdate();
$callback_query = $update->getCallbackQuery();
$callback_query_id = $callback_query->getId();
$callback_data = $callback_query->getData();
$data['callback_query_id'] = $callback_query_id;
if ($this->getTelegram()->getCommandObject($callback_data)){
return $this->getTelegram()->executeCommand($callback_data);
}
[....]How I can resolve this problem?
Thanks in advance!
Metadata
Metadata
Assignees
Labels
No labels