Skip to main content
Version: 1.x

EventInterceptorContextData

EventInterceptorContextData​

Signature
interface EventInterceptorContextData<E extends keyof ClientEvents> {
filter?: (...args: ClientEvents[E]) => Awaitable<boolean>;
time?: number;
autoReset?: boolean;
once?: boolean;
onEnd?: (reason: string) => Awaitable<void>;
onError?: EventInterceptorErrorHandler;
}

filter​

property
(...args: ClientEvents[E]) => Awaitable<boolean>

The filter to use for the collector.

time​

property
number

The duration (in ms) that the collector should run for.

autoReset​

property
boolean

If the collector should automatically reset the timer when a button is clicked.

once​

property
boolean

Whether the collector should run only once.

onEnd​

property
(reason: string) => Awaitable<void>

The handler to run when the collector ends.

onError​

The handler to run upon an error.