@theophilusdev/conduit
    Preparing search index...

    Interface CollectorOptions<K>

    Shared configuration for message collectors and one-time await helpers.

    Generic over K — the tuple of Conduit events to subscribe to. The filter callback and collected payload type are automatically derived as a union of all event payloads in K.

    // default — T is MessageRespondPayload
    sent.collect({ timeout: 30_000 });

    // custom — T is MessageReactPayload | UserCreatePayload
    sent.collect({
    timeout: 30_000,
    events: ["message:react", "user:create"] as const,
    });
    interface CollectorOptions<
        K extends readonly (keyof ConduitEvents)[] = ["message:respond"],
    > {
        filter?: (message: CollectorPayload<K>) => boolean | Promise<boolean>;
        max?: number;
        timeout?: number;
    }

    Type Parameters

    Index

    Properties

    Properties

    filter?: (message: CollectorPayload<K>) => boolean | Promise<boolean>

    Conduit events the collector subscribes to. Defaults to ["message:respond"] — only direct replies.

    max?: number
    timeout?: number