Skip to main content
Module

x/grammy_conversations/mod.ts>ConversationForm#number

Conversational interfaces for grammY
Go to Latest
method ConversationForm.prototype.number
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 parseFloat, 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.

Parameters

optional
otherwise: (ctx: C) => unknown | Promise<unknown>

Handler that will be run for skipped updates