Skip to content

Commit

Permalink
chore: fix components type
Browse files Browse the repository at this point in the history
  • Loading branch information
suneettipirneni committed Feb 9, 2022
1 parent c9f932d commit a4c108f
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 4 deletions.
8 changes: 7 additions & 1 deletion deno/payloads/v8/channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1015,11 +1015,17 @@ export interface APIActionRowComponent extends APIBaseMessageComponent<Component
components: Exclude<APIMessageComponent, APIActionRowComponent>[];
}

export interface ModalSubmitComponent {
type: ComponentType;
custom_id: string;
value: string;
}

export interface APIModalActionRowComponent extends APIBaseMessageComponent<ComponentType.ActionRow> {
/**
* The components in the ActionRow
*/
components: Exclude<APIModalComponent, APIModalActionRowComponent>[];
components: ModalSubmitComponent[];
}

/**
Expand Down
8 changes: 7 additions & 1 deletion deno/payloads/v9/channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1180,11 +1180,17 @@ export interface APIActionRowComponent extends APIBaseMessageComponent<Component
components: Exclude<APIMessageComponent, APIActionRowComponent>[];
}

export interface ModalSubmitComponent {
type: ComponentType;
custom_id: string;
value: string;
}

export interface APIModalActionRowComponent extends APIBaseMessageComponent<ComponentType.ActionRow> {
/**
* The components in the ActionRow
*/
components: Exclude<APIModalComponent, APIModalActionRowComponent>[];
components: ModalSubmitComponent[];
}

/**
Expand Down
8 changes: 7 additions & 1 deletion payloads/v8/channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1015,11 +1015,17 @@ export interface APIActionRowComponent extends APIBaseMessageComponent<Component
components: Exclude<APIMessageComponent, APIActionRowComponent>[];
}

export interface ModalSubmitComponent {
type: ComponentType;
custom_id: string;
value: string;
}

export interface APIModalActionRowComponent extends APIBaseMessageComponent<ComponentType.ActionRow> {
/**
* The components in the ActionRow
*/
components: Exclude<APIModalComponent, APIModalActionRowComponent>[];
components: ModalSubmitComponent[];
}

/**
Expand Down
1 change: 1 addition & 0 deletions payloads/v8/interactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export * from './_interactions/messageComponents';
export * from './_interactions/ping';
export * from './_interactions/responses';
export * from './_interactions/applicationCommands';
export * from './_interactions/modalSubmit';

/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
Expand Down
8 changes: 7 additions & 1 deletion payloads/v9/channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1180,11 +1180,17 @@ export interface APIActionRowComponent extends APIBaseMessageComponent<Component
components: Exclude<APIMessageComponent, APIActionRowComponent>[];
}

export interface ModalSubmitComponent {
type: ComponentType;
custom_id: string;
value: string;
}

export interface APIModalActionRowComponent extends APIBaseMessageComponent<ComponentType.ActionRow> {
/**
* The components in the ActionRow
*/
components: Exclude<APIModalComponent, APIModalActionRowComponent>[];
components: ModalSubmitComponent[];
}

/**
Expand Down
1 change: 1 addition & 0 deletions payloads/v9/interactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export * from './_interactions/messageComponents';
export * from './_interactions/ping';
export * from './_interactions/responses';
export * from './_interactions/applicationCommands';
export * from './_interactions/modalSubmit';

/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
Expand Down

0 comments on commit a4c108f

Please sign in to comment.