Interface PurgeOptions<T>

interface PurgeOptions<T> {
    after?: string;
    around?: string;
    before?: string;
    limit: number;
    reason?: string;
    filter?(message): boolean | "break" | PromiseLike<boolean | "break">;
}

Type Parameters

Properties

after?: string

The ID of the message to purge after.

around?: string

The ID of the message to purge around.

before?: string

The ID of the message to purge before.

limit: number

The limit of messages to purge.

reason?: string

The reason for purging the messages.

Methods

  • A function used to reject certain messages. If "break" is returned, further iteration of messages will stop and purging will begin immediately.

    Parameters

    • message: Message<T>

      The message to filter.

    Returns boolean | "break" | PromiseLike<boolean | "break">