Skip to main content
Go to Latest
method ConversationHandle.prototype.waitFor
import { ConversationHandle } from "https://deno.land/x/grammy_conversations@v1.1.0/conversation.ts";

Waits for a new update (e.g. a message, callback query, etc) that matches the given filter query. As soon as an update arrives that matches the filter query, the corresponding context object is returned.

Parameters

query: Q | Q[]

The filter query to check

optional
opts: OtherwiseConfig<C>

Optional config for discarded updates

Returns

Promise<Filter<C, Q>>