Skip to main content
Module

x/grammy_emoji/deps.deno.ts>Composer#gameQuery

Use emoji names instead of Unicode strings. Copy-pasting emoji sucks.
Go to Latest
method Composer.prototype.gameQuery
import { Composer } from "https://deno.land/x/grammy_emoji@v1.1.2/deps.deno.ts";

Registers some middleware for game queries, i.e. the updates that Telegram delivers to your bot when a user clicks an inline button for the HTML5 games platform on Telegram.

This method is essentially the same as calling

bot.on('callback_query:game_short_name', ctx => { ... })

but it also allows you match the query data agains a given text or regular expression.

You can pass an array of triggers. Your middleware will be executed if at least one of them matches.

Parameters

trigger: MaybeArray<string | RegExp>

The string to look for in the payload

...middleware: Array<GameQueryMiddleware<C>>

The middleware to register