Home>

I use https://github.com/irazasyed/telegram-bot-sdk.

Include ('vendor /autoload.php');
Use Telegram \ Bot \ API;
Use Telegram \ Bot \ Keyboard \ Keyboard;
  $ API= 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
  $ Telegram= New API ($ API);
  $ result= $ Telegram->
getwebhookupdates ();
  $ result= json_decode ($ result, true);
  $ Text= $ Result ["message"] ["text"];
  $ Chat_id= $ Result ["message"] ["Chat"] ["id"];
  $ Update= Telegram :: Commandshandler (True);
  $ Query= $ Update->
getCallbackQuery ();
  $ callback_id= $ Query->
getid ();
if ($ text== 'START' OR $ Text== $ backbutton) {
  $ inline_Keyboard= Keyboard :: Make (['resize_Keyboard'= >
 True])
    ->
ROW (
      Keyboard :: InLineButton (['Text'= >
 "Азақша", 'callback_data'= >
 "KAZ"]),
      Keyboard :: InLineButton (['Text'= >
 "Russian", 'callback_data'= >
 'rus'])
    );
 $ Telegram->
SendMessage ([
  'Chat_id'= >
 $ Chat_id,
  'Text'= >
 'xxxxxx',
  'Parse_Mode'= >
 'HTML',
  'reply_markup'= >
 $ Inline_Keyboard,
  ]);
}
if ($ callback_id== 'kaz') {
      $ inline_keyboard_one= Keyboard :: Make (['resize_Keyboard'= >
 True])
    ->
ROW (
      Keyboard :: InLineButton (['Text'= >
 '123', 'callback_data'= >
 "PROD"]),
    );
 $ Telegram->
SendMessage ([
  'Chat_id'= >
 $ Chat_id,
  'Text'= >
 'xxxxxx',
  'Parse_Mode'= >
 'HTML',
  'reply_markup'= >
 $ inline_Keyboard_One,
  ]);
}

Does not work Help pliz ?????

"It does not work" the concept of tensile. Errors, errors in the logs where? Psychics on vacation

ArchDemon2021-06-04 23:44:44