-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.d.ts
More file actions
23 lines (18 loc) · 1.08 KB
/
index.d.ts
File metadata and controls
23 lines (18 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import { APIMessageComponentInteractionData, APIUser, APIInteraction, APIButtonComponentWithCustomId, APISelectMenuComponent, APIMessageComponentInteraction } from 'discord-api-types/v10';
declare class BetterComponent {
readonly info: Omit<APIButtonComponentWithCustomId | APISelectMenuComponent, "custom_id">;
callback: ((interaction: APIMessageComponentInteraction, component: BetterComponent) => unknown) | null;
readonly id: string;
component: APIButtonComponentWithCustomId | APISelectMenuComponent;
constructor(info: Omit<APIButtonComponentWithCustomId | APISelectMenuComponent, "custom_id">, extraEncodedInfo: Record<string, any>);
setCallback(fn: (interaction: APIMessageComponentInteraction, component: BetterComponent) => unknown): this;
destroy(): this;
}
declare const cc: {
setHandlers(router: (button: APIMessageComponentInteractionData, user: APIUser) => string, info: {
[route: string]: (button: APIMessageComponentInteractionData, user: APIUser) => unknown;
}): void;
handle(interaction: APIInteraction): void;
BetterComponent: typeof BetterComponent;
};
export = cc;