🎉
Release of grammY 1.3 🎉
This update is all about more convenience.
What's new for Bot:
+
Added an onStart callback that is run after initialisation, and before polling starts.
+ The bot.botInfo property
is now public and available after initialising the bot.
+ Added an automatic memory leak prevention for inexperienced users.
What's new for filter queries:
+ Added
shortcuts that group queries commonly used together, example: bot.on('edit').
+ Implemented an optimisation engine that automatically improves filter query performance.
+ Filter query types can now more accurately tell if a query does not make sense, e.g. channel_post:left_chat_member (that message type does not exist).
What's new for Context:
+ The shortcuts ctx.chat and ctx.from respect chat_member and my_chat_member updates.
+ Added a getFile method.
+
Transformative context flavours are a more powerful type of context flavour that enable new categories of plugins.
What's new for command handling:
+ Added auto-complete suggestions for 'start', 'help', and 'settings'.
+ Improved types for command arguments.
+ Fixed handling commands @-directed for other bots.
What's new for the internal client implementation:
+ Added
API flavours that let you install custom types to align API methods with your installed transformers.
+ Allow transformers to throw their own errors. They were considered as network errors before.
+
Added a flag to the bot configuration that activates sensitive logs. This allows you to print raw network error messages if DEBUG is set, but it will leak the bot token.
+ Improved client speed for handling nested objects such as inline keyboards.
What's new for docs and error handling:
+ Automatic stopping of polling when the token is wrong or another instance is running.
+ Improved lots of error messages, this includes those during polling.
+ Added numerous new sections to
grammy.dev for this update.
+ Improved inline documentation in many places.
+ Updated Telegram Bot API types and documentation.
Transformative context flavours in combination with API flavours enable a wealth of new exciting plugins. For now, there are two of them:
+
New hydration plugin. Installs convenient methods on API call results and on the context object. It has now reached 1.0 and is considered stable.
+
New files plugin. Makes downloading files as simple as file.download(). It has now reached 1.0 and is considered stable.
Update your dependencies and enjoy!