function matchFilter(filter) {
    const parsed = parse(filter);
    const predicate = compile(parsed);
    return (ctx) => predicate(ctx);
}
/**
 * > This is an advanced function of grammY.
 *
 * Takes a filter query and turns it into a predicate function that can check in
 * constant time whether a given context object satisfies the query. The created
 * predicate can be passed to `bot.filter` and will narrow down the context
 * accordingly.
 *
 * This function is used internally by `bot.on` but exposed for advanced usage
 * like the following.
 * ```ts
 * // Listens for updates except forwards of messages or channel posts
 * bot.drop(matchFilter(':forward_date'), ctx => { ... })
 * ```
 *
 * Check out the
 * [documentation](https://doc.deno.land/https/deno.land/x/grammy/mod.ts#Composer)
 * of `bot.on` for examples. In addition, the
 * [website](https://grammy.dev/guide/filter-queries.html) contains more
 * information about how filter queries work in grammY.
 *
 * @param filter A filter query or an array of filter queries
 */
> This is an advanced function of grammY.
Takes a filter query and turns it into a predicate function that can check in
constant time whether a given context object satisfies the query. The created
predicate can be passed to `bot.filter` and will narrow down the context
accordingly.

This function is used internally by `bot.on` but exposed for advanced usage
like the following.
```ts
Listens for updates except forwards of messages or channel posts
bot.drop(matchFilter(':forward_date'), ctx => { ...

Check out the
[documentation]
of `bot.on` for examples. In addition, the
[website] contains more
information about how filter queries work in grammY.

@param filter A filter query or an array of filter queries
> This is an advanced function of grammY . Takes a filter query and turns it into a predicate function that can check in constant time whether a given context object satisfies the query . The created predicate can be passed to ` bot . filter ` and will narrow down the context accordingly . This function is used internally by ` bot . on ` but exposed for advanced usage like the following . ` ` ` ts Listens for updates except forwards of messages or channel posts bot . drop ( matchFilter ( ' : forward_date ' ) ctx = > { ... Check out the [ documentation ] of ` bot . on ` for examples . In addition the [ website ] contains more information about how filter queries work in grammY . @param filter A filter query or an array of filter queries
function matchFilter(filter) {
    const parsed = parse(filter);
    const predicate = compile(parsed);
    return (ctx) => predicate(ctx);
}
function matchFilter ( filter ) { const parsed = parse ( filter ) ; const predicate = compile ( parsed ) ; return ( ctx ) => predicate ( ctx ) ; }
> This is an advanced function of grammY.
> This is an advanced function of grammY .