telegramsjs
    Preparing search index...

    Interface IReactionEventCollector

    Interface for reaction event collector.

    interface IReactionEventCollector {
        collect: (
            data: MessageReactionUpdated,
            collect: ReadonlyCollection<string, MessageReactionUpdated>,
        ) => PossiblyAsync<void>;
        create: (data: MessageReactionUpdated) => PossiblyAsync<void>;
        dispose: (
            data: MessageReactionUpdated,
            collect: ReadonlyCollection<string, MessageReactionUpdated>,
        ) => PossiblyAsync<void>;
        end: (
            collected: ReadonlyCollection<string, MessageReactionUpdated>,
            reason: string,
        ) => PossiblyAsync<void>;
        ignore: (data: MessageReactionUpdated) => PossiblyAsync<void>;
        user: (
            data: ReadonlyCollection<string, MessageReactionUpdated[]>,
        ) => PossiblyAsync<void>;
    }

    Hierarchy (View Summary)

    Index

    Properties

    collect: (
        data: MessageReactionUpdated,
        collect: ReadonlyCollection<string, MessageReactionUpdated>,
    ) => PossiblyAsync<void>

    Triggered when a new item is collected. The collect function receives the item (data) and the collection itself (collect). Can perform any asynchronous or synchronous operations needed to handle the collected item.

    Type Declaration

    create: (data: MessageReactionUpdated) => PossiblyAsync<void>

    Event emitted when a reaction is created.

    Type Declaration

    dispose: (
        data: MessageReactionUpdated,
        collect: ReadonlyCollection<string, MessageReactionUpdated>,
    ) => PossiblyAsync<void>

    Triggered when an item is removed or disposed of from the collection. The dispose function receives the data item (data) and the collection itself (collect). Use this to handle any cleanup or additional logic when an item is removed from the collection.

    Type Declaration

    end: (
        collected: ReadonlyCollection<string, MessageReactionUpdated>,
        reason: string,
    ) => PossiblyAsync<void>

    Triggered when the collection process ends. The end function receives the final collection (collected) and a reason (reason) for the collection’s termination. Use this to handle any finalization or post-processing steps.

    Type Declaration

    ignore: (data: MessageReactionUpdated) => PossiblyAsync<void>

    Triggered when a data item is ignored. The ignore function is called with the ignored item (data). This is useful for cases where items do not meet certain criteria and should not be added to the collection.

    Type Declaration

    user: (
        data: ReadonlyCollection<string, MessageReactionUpdated[]>,
    ) => PossiblyAsync<void>

    Event emitted when a user reacts.

    Type Declaration