From 2bf75715c89e3a5148f2354ed3d85c150f8d42ce Mon Sep 17 00:00:00 2001 From: PabloRNC <99443080+PabloRNC@users.noreply.github.com> Date: Thu, 28 Mar 2024 17:00:26 +0100 Subject: [PATCH] Add setComponents method to Modal Builder. (#167) * refactor: change method name for MentionableSelectMenu builder * refactor: change jsdoc comments * feat: add setcomponents method to modal --- src/builders/Modal.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/builders/Modal.ts b/src/builders/Modal.ts index 8961ce9..cc83739 100644 --- a/src/builders/Modal.ts +++ b/src/builders/Modal.ts @@ -46,6 +46,16 @@ export class Modal { 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[]): this { + this.components = [...component]; + return this; + } + /** * Sets the title of the modal. * @param title - The title of the modal.