You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Introduced the unpinAllGeneralForumTopicMessages method (API 6.8).
Added the inlineQuery method, which registers a callback function to execute when an inline query matches the specified text.
Added the gameQuery method, which registers a callback function when a message containing a "game" object is received.
Introduced the MenuBuilder class for creating menus with buttons.
Introduced the Keyboard class for creating menus from keyboards.
Added parameters to the TelegramBot(token, { limit, timeout, allowed_updates }) constructor.
Added a combine parameter to the TelegramBot.use method, which merges the previous session with the new one (default is false).
Added a caption parameter to the TelegramBot.hears method (whether to respond to captions, default is false).
Added new tests.
Removed
Removed the buildKeyboard and is2D methods from the Markup class, as all methods are now public by default (in plain JavaScript).
Removed the public keyword from all classes, as all methods are already public by default.
Removed the decodeIntents function.
Removed the IntentsBitField class.
Removed the leave and kickChatMember methods in the context.
Fixed
The context was missing methods that should have been present since version 1.7.4 (setMyDescription, getMyDescription, setMyShortDescription, setMyName, getMyName).
The setWebhook method was behaving like getMe.
In TelegramBot.command, if you specified, for example, test, test1, test2, and then wrote test, all commands (test1, test2) would execute along with test.
In TelegramBot.action, if you specified the answer parameter, it triggered for all interactions with callback_query:data.
Changed
intents is now TelegramBot.options.allowed_updates.
The type of session changed from any to unknown.
session now has default values ({}).
events no longer need to be described as before. Events of the type message:text and message:caption have also been added. (Will be added over time)
The Request class now accepts a generic type, which is done for events.
The on method now allows specifying an array of events. Type errors are added if a non-array and non-string is specified.
The Collection.hasKeys and Collection.hasValues methods now return false if emptiness is specified instead of an empty object.
The TelegramBot.command method, specifically the args parameter, will always return an array of strings, not undefined | string[].
The action, command, and hears methods return TelegramBot.
The send method in the context is no longer part of the chat object; it is now available as a method, for example, reply.