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
numberThe duration (in ms) that the collector should run for.
autoReset
property
booleanIf the collector should automatically reset the timer when a button is clicked.
once
property
booleanWhether the collector should run only once.
onEnd
property
(reason: string) => Awaitable<void>The handler to run when the collector ends.
onError
property
The handler to run upon an error.