Skip to main content
Module

x/grammy_conversations/mod.ts>ConversationForm#int

Conversational interfaces for grammY
Go to Latest
method ConversationForm.prototype.int
Re-export
import { ConversationForm } from "https://deno.land/x/grammy_conversations@v1.1.0/mod.ts";

Waits until the user sends a number, and returns this number. If the user sends something that cannot be parsed to a number using parseInt, these updates will be skipped. You may specify the otherwise handler that is called in such cases. Among other things, this allows you to tell the user that they need to send some text. You can also pass a radix that will be passed to parseInt.

Parameters

optional
options: number | ((ctx: C) => Promise<unknown> | unknown) | { radix?: number; otherwise?: (ctx: C) => Promise<unknown> | unknown; } = [UNSUPPORTED]

Options for radix and otherwise handler