exit(0);
}
+if (getTelegram()->getWebHookUpdates()->detectType() == 'callback_query') {
+ $cbq = getTelegram()->getWebHookUpdates()->getCallbackQuery();
+ // handling for paginating shit
+ $data = $cbq->getData(); // that's gonna have the data attached to the button
+ if ($data) {
+ $keyboard = [
+ 'inline_keyboard' => [[['text' => $data == 'jeff' ? 'chef' : 'jeff', 'callback_data' => $data == 'jeff' ? 'chef' : 'jeff']]],
+ ];
+
+ $markup = json_encode($keyboard);
+
+ getTelegram()->editMessageText([
+ 'chat_id' => getTelegram()->getWebHookUpdates()->getChat()->getId(),
+ 'message_id' => $cbq->getMessage()->getMessageId(),
+ 'text' => 'my name is ' . $data,
+ 'reply_markup' => $markup
+ ]);
+ }
+}
+
getTelegram()->addCommand(
new class extends Command {
protected $name = 'digest';