Skip to content

Migrating from 0.35

Armando Lüscher edited this page Dec 20, 2016 · 4 revisions

As of 0.36, the entities namespaces have changed and might need to be adjusted in your custom commands.

Main changes:

  • All InlineQuery classes are now in the namespace Longman\TelegramBot\Entities\InlineQuery\*.
  • All InputMessageContent classes are now in the namespace Longman\TelegramBot\Entities\InputMessageContent\*
  • Keyboard

KeyboardMarkup, ReplyKeyboardMarkup and InlineKeyboardMarkup are now called Keyboard, Keyboard and InlineKeyboard respectively.

There are new helper classes and methods to make keyboard usage easier: KeyboardButton and InlineKeyboardButton

ForceReply and ReplyKeyboardHide have been replaced by the static Keyboard methods Keyboard::forceReply() and Keyboard::hide().

Best check the examples and existing commands to see proper usage.

Also, take a look at: https://github.com/akalongman/php-telegram-bot/wiki/New-Keyboard-structure-and-how-to-pass-dynamic-arguments