telebot-ts API Documentation - v1.0.0
    Preparing search index...

    Interface ConversationHandlerOptions<C>

    Options for configuring a ConversationHandler.

    interface ConversationHandlerOptions<
        C extends CallbackContext = CallbackContext,
    > {
        allow_reentry?: boolean;
        entry_points: BaseHandler<C, any>[];
        fallbacks: BaseHandler<C, any>[];
        map_to_parent?: Record<string | number, string | number>;
        name?: string;
        per_chat?: boolean;
        per_message?: boolean;
        per_user?: boolean;
        persistent?: boolean;
        states: Record<number | string, BaseHandler<C, any>[]>;
    }

    Type Parameters

    Index
    allow_reentry?: boolean

    Whether to allow re-entering the conversation while already in an active state.

    false

    entry_points

    entry_points: BaseHandler<C, any>[]

    Handlers used to initiate the conversation from an inactive state.

    fallbacks: BaseHandler<C, any>[]

    Handlers run when none of the state handlers match or for common exit commands (e.g. /cancel).

    map_to_parent?: Record<string | number, string | number>

    Optional mapping of child conversation exit states to parent conversation states.

    name?: string

    Optional name identifying this conversation in persistence.

    per_chat?: boolean

    Whether conversation is tracked per chat.

    true

    per_message?: boolean

    Whether conversation is tracked per message (e.g. inline callback queries).

    false

    per_user?: boolean

    Whether conversation is tracked per user.

    true

    persistent?: boolean

    Whether persistence is enabled for this conversation handler.

    false

    states: Record<number | string, BaseHandler<C, any>[]>

    Handlers indexed by state identifier (number or string).