This is a rather minor release.
anyOf
and allOf
filter combinators
v4.11.0 introduced support for type-guard filters in Composer::on
, which allowed you to filter updates based on their content.
This release adds two new combinators to the filter API: anyOf
and allOf
. This will play very nicely with custom filters. For example:
import { anyOf, allOf } from "telegraf/filters";
// must match all filters
bot.on(allOf(message(), isGroup), ctx => {
// ...
});
Deprecating hookPath
The confusingly named hookPath
in bot.launch
webhook options is now deprecated. It will be removed in the next major release. You can start using path
instead, today.
Meanwhile, we're working on new modules to add to the Telegraf ecosystem. Look forward to them, and join discussions in the official Telegraf chat!