nyx Typedoc
    Preparing search index...

    Interface Session<Result, Types>

    An object that represents a user's interaction session with a bot.

    A session stores its state, and can be updated and respond to user interactions.

    interface Session<Result, Types extends InteractionTypes = InteractionTypes> {
        buildCustomId(extra?: string): string;
        getBot(): NyxBot;
        getChannelId(): string;
        getCustomIdData(extra?: string): SessionCustomIdData;
        getEndPromise(): Promise<SessionEndData<Result>>;
        getGuildId(): string | null;
        getId(): string;
        getMeta(): Readonly<Metadata> | null;
        getResult(): Result | null;
        getStartFilter(): SessionStartFilterResolvable<Result, Types> | null;
        getStartInteraction(): SessionStartInteraction<Types>;
        getState(): SessionState;
        getTTL(): number;
        getUpdateFilter(): SessionUpdateFilterResolvable<Result, Types> | null;
        getUserId(): string;
        hasReplied(): boolean;
        onEnd(
            reason: string,
            code: SessionEndCode,
            meta: Metadata,
        ): Awaitable<void>;
        onStart(meta: Metadata): Awaitable<void>;
        onUpdate(
            interaction: SessionUpdateInteraction<Types>,
            meta: Metadata,
        ): Awaitable<boolean>;
        setState(state: SessionState): void;
        start(): Awaitable<void>;
    }

    Type Parameters

    Hierarchy (View Summary)

    Implemented by

    Index