Skip to main content
Module

x/grammy_conversations/mod.ts>ConversationHandle#waitUntil

Conversational interfaces for grammY
Go to Latest
method ConversationHandle.prototype.waitUntil
import { ConversationHandle } from "https://deno.land/x/grammy_conversations@v1.1.1/mod.ts";

Waits for a new update (e.g. a message, callback query, etc) that fulfils a certain condition. This condition is specified via the given predicate function. As soon as an update arrives for which the predicate function returns true, this method will return it.

Type Parameters

D extends C

Parameters

predicate: (ctx: C) => ctx is D

Condition to fulfil

optional
opts: OtherwiseConfig<C>

Optional config for discarded updates

Returns

Promise<D>

Parameters

predicate: (ctx: C) => boolean | Promise<boolean>
optional
opts: OtherwiseConfig<C>

Returns

Promise<C>