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

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

Parameters

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

Condition not to fulfil

optional
opts: OtherwiseConfig<C>

Optional config for discarded updates

Returns

Promise<C>