Add setComponents method to Modal Builder. (#167)

* refactor: change method name for MentionableSelectMenu builder

* refactor: change jsdoc comments

* feat: add setcomponents method to modal
This commit is contained in:
PabloRNC 2024-03-28 17:00:26 +01:00 committed by GitHub
parent 71a145612d
commit 2bf75715c8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -46,6 +46,16 @@ export class Modal<T extends ModalBuilderComponents = TextInput> {
return this; return this;
} }
/**
* Set the components to the modal.
* @param component - The components to set into the modal.
* @returns The current Modal instance.
*/
setComponents(component: ActionRow<T>[]): this {
this.components = [...component];
return this;
}
/** /**
* Sets the title of the modal. * Sets the title of the modal.
* @param title - The title of the modal. * @param title - The title of the modal.