Skip to content

Commit

Permalink
types: allow component classes in action row data (#7614)
Browse files Browse the repository at this point in the history
* types: allow component classes in action row data

* types: allow components to be passed inside objects in messages

Co-authored-by: Rodry <38259440+ImRodry@users.noreply.github.com>
  • Loading branch information
suneettipirneni and ImRodry committed Mar 12, 2022
1 parent dcd4797 commit 230c0c4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/discord.js/typings/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ export class ActionRow<
> extends BuilderActionRow<T> {
constructor(
data?:
| ActionRowData<MessageActionRowComponentData | ModalActionRowComponentData>
| ActionRowData<MessageActionRowComponentData | ModalActionRowComponentData | ActionRowComponent>
| (Omit<APIActionRowComponent<APIMessageActionRowComponent | APIModalActionRowComponent>, 'type'> & {
type?: ComponentType.ActionRow;
}),
Expand Down Expand Up @@ -4667,7 +4667,7 @@ export interface MessageEditOptions {
allowedMentions?: MessageMentionOptions;
components?: (
| ActionRow<MessageActionRowComponent>
| (Required<BaseComponentData> & ActionRowData<MessageActionRowComponentData>)
| (Required<BaseComponentData> & ActionRowData<MessageActionRowComponentData | MessageActionRowComponent>)
| APIActionRowComponent<APIMessageActionRowComponent>
)[];
}
Expand Down Expand Up @@ -4708,7 +4708,7 @@ export interface MessageOptions {
embeds?: (Embed | APIEmbed)[];
components?: (
| ActionRow<MessageActionRowComponent>
| (Required<BaseComponentData> & ActionRowData<MessageActionRowComponentData>)
| (Required<BaseComponentData> & ActionRowData<MessageActionRowComponentData | MessageActionRowComponent>)
| APIActionRowComponent<APIMessageActionRowComponent>
)[];
allowedMentions?: MessageMentionOptions;
Expand Down

0 comments on commit 230c0c4

Please sign in to comment.