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

    Interface SessionOptions<S>

    Options for configuring session middleware.

    interface SessionOptions<S> {
        getSessionKey?: (context: CallbackContext) => string | undefined;
        initial?: () => S;
        prefix?: string;
        storage?: SessionStorage<S>;
    }

    Type Parameters

    • S

      Shape of the session data.

    Index
    getSessionKey?: (context: CallbackContext) => string | undefined

    Custom session key generator function. Default: extracts user ID or chat ID.

    initial?: () => S

    Factory function returning initial state for new sessions.

    prefix?: string

    Key prefix for namespacing session records. Default: "session:".

    storage?: SessionStorage<S>

    Storage backend instance. Default: MemorySessionStorage.