Skip to main content
Module

x/grammy_router/deps.deno.ts>FilterQuery

Router middleware for grammY
Latest
type alias FilterQuery
import { type FilterQuery } from "https://deno.land/x/grammy_router@v2.0.0/deps.deno.ts";

Represents a filter query that can be passed to bot.on. There are three different kinds of filter queries: Level 1, Level 2, and Level 3. Check out the website to read about how filter queries work in grammY, and how to use them.

Here are three brief examples:

// Listen for messages of any type (Level 1)
bot.on('message', ctx => { ... })
// Listen for audio messages only (Level 2)
bot.on('message:audio', ctx => { ... })
// Listen for text messages that have a URL entity (Level 3)
bot.on('message:entities:url', ctx => { ... })
definition: AllValidFilterQueries