Add types for Discord components
This commit is contained in:
parent
dfd9325775
commit
e49bc76e20
1 changed files with 32 additions and 0 deletions
32
src/types/discord_components.ts
Normal file
32
src/types/discord_components.ts
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
interface emoji {
|
||||
name: string;
|
||||
id: string;
|
||||
animated: boolean;
|
||||
}
|
||||
|
||||
interface action_row {
|
||||
type: 1,
|
||||
components: any[];
|
||||
}
|
||||
|
||||
interface button {
|
||||
type: 2;
|
||||
|
||||
/**
|
||||
* - 1 = Primary (Blurple)
|
||||
* - 2 = Secondary (Gray)
|
||||
* - 3 = Success (Green)
|
||||
* - 4 = Danger (Red)
|
||||
*/
|
||||
style: 1 | 2 | 3 | 4;
|
||||
custom_id: string;
|
||||
label?: string;
|
||||
emoji?: emoji;
|
||||
disabled?: boolean;
|
||||
}
|
||||
|
||||
interface link_button {
|
||||
type: 2;
|
||||
style: 5;
|
||||
url: string;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue