You are reading the documentation for the next version of discord.js. Documentation for v13/v14+ has been moved to old.discordjs.dev

ToEventMap

export declare type ToEventMap<TRecord extends Record<string, any>, TResponses extends Record<keyof TRecord, any> | undefined = undefined> = {
[TKey in keyof TRecord]: [
event: TResponses extends Record<keyof TRecord, any> ? {
ack(): Promise<void>;
reply(data: TResponses[TKey]): Promise<void>;
} : {
ack(): Promise<void>;
} & {
data: TRecord[TKey];
}
];
} & {
[K: string]: any;
};
export declare type ToEventMap<TRecord extends Record<string, any>, TResponses extends Record<keyof TRecord, any> | undefined = undefined> = {
[TKey in keyof TRecord]: [
event: TResponses extends Record<keyof TRecord, any> ? {
ack(): Promise<void>;
reply(data: TResponses[TKey]): Promise<void>;
} : {
ack(): Promise<void>;
} & {
data: TRecord[TKey];
}
];
} & {
[K: string]: any;
};

No summary provided.