Skip to content

v4.15.0

Compare
Choose a tag to compare
@MKRhere MKRhere released this 23 Oct 16:52
· 67 commits to v4 since this release
e5c34fa

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!