0
0
Fork 0

Add types for Discord components

This commit is contained in:
Oliver-Akins 2021-09-19 01:45:09 -06:00
parent dfd9325775
commit e49bc76e20

View 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;
}