Module

x/grammy/filter.ts>FilterQuery

The Telegram Bot Framework.
Very Popular
Go to Latest
type alias FilterQuery
import { type FilterQuery } from "https://dotland.deno.dev/x/grammy@v1.12.4/filter.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