ComponentHandler

Signature

export declare class ComponentHandler extends BaseHandler

Private types

COMPONENTSTypeAlias
type COMPONENTS = {    components: {        match: MatchCallback;        callback: ComponentCallback;    }[];    options?: ListenerOptions;    messageId: string;    channelId: string;    guildId: string | undefined;    idle?: NodeJS.Timeout;    timeout?: NodeJS.Timeout;    onError?: ComponentOnErrorCallback;    __run: (customId: UserMatches, callback: ComponentCallback) => any;};
ComponentSetTransformerTypeAlias
type ComponentSetTransformer = (component: ComponentCommands) => ComponentCommands | false | void;
UserMatchesTypeAlias
type UserMatches = string | string[] | RegExp;

Properties

filter: (path: string) => boolean;

Filters a file path.

Parameters
path
The path to filter.
Returns

`true` if the path passes the filter, otherwise `false`.

Methods

hasComponent(id: string, customId: string): boolean | undefined;
reload(path: string): Promise<any>;
reloadAll(stopIfFail?: boolean): Promise<void>;