Skip to main content
Module

x/grammy_conversations/mod.ts>ConversationConfig

Conversational interfaces for grammY
Go to Latest
interface ConversationConfig
import { type ConversationConfig } from "https://deno.land/x/grammy_conversations@v1.1.1/mod.ts";

Configuration options that can be passed when using createConversation to turn a conversation builder function into middleware.

Properties

optional
id: string

Identifier of the conversation which can be used to enter it. Defaults to the name of the function.

optional
maxMillisecondsToWait: number

Maximum number of milliseconds to wait. If an update is received after this time has elapsed, the conversation will be left automatically instead of resuming, and the update will be handled as if the conversation had not been active.

This is the default value that each conversation with this identifier starts with. Note that you can override this value for a specific run of the conversation when calling ctx.conversation.enter. In addition, you can adjust this value from within a conversation between wait calls by assigning a new value to conversation.millisecondsToWait.