diff --git a/plugins/plugin_base/src/discord/base/CustomIntetaction.ts b/plugins/plugin_base/src/discord/base/CustomIntetaction.ts index ab8e745c..fd3df053 100644 --- a/plugins/plugin_base/src/discord/base/CustomIntetaction.ts +++ b/plugins/plugin_base/src/discord/base/CustomIntetaction.ts @@ -34,14 +34,14 @@ export interface APIModalInteractionResponseCallbackData { /** * Between 1 and 5 (inclusive) components that make up the modal */ - components: ActionRowBuilder[] + components?: ActionRowBuilder[] } export class ModalBuilder extends Modal { constructor({ components, customId, title }: APIModalInteractionResponseCallbackData) { super() this.setTitle(title) - this.setComponents(components) + if (components) this.setComponents(components) this.setCustomId(`${name}_${customId}`) } } \ No newline at end of file diff --git a/plugins/tickets/src/discord/base/CustomIntetaction.ts b/plugins/tickets/src/discord/base/CustomIntetaction.ts index ab8e745c..fd3df053 100644 --- a/plugins/tickets/src/discord/base/CustomIntetaction.ts +++ b/plugins/tickets/src/discord/base/CustomIntetaction.ts @@ -34,14 +34,14 @@ export interface APIModalInteractionResponseCallbackData { /** * Between 1 and 5 (inclusive) components that make up the modal */ - components: ActionRowBuilder[] + components?: ActionRowBuilder[] } export class ModalBuilder extends Modal { constructor({ components, customId, title }: APIModalInteractionResponseCallbackData) { super() this.setTitle(title) - this.setComponents(components) + if (components) this.setComponents(components) this.setCustomId(`${name}_${customId}`) } } \ No newline at end of file diff --git a/plugins/utils/src/discord/base/CustomIntetaction.ts b/plugins/utils/src/discord/base/CustomIntetaction.ts index ab8e745c..fd3df053 100644 --- a/plugins/utils/src/discord/base/CustomIntetaction.ts +++ b/plugins/utils/src/discord/base/CustomIntetaction.ts @@ -34,14 +34,14 @@ export interface APIModalInteractionResponseCallbackData { /** * Between 1 and 5 (inclusive) components that make up the modal */ - components: ActionRowBuilder[] + components?: ActionRowBuilder[] } export class ModalBuilder extends Modal { constructor({ components, customId, title }: APIModalInteractionResponseCallbackData) { super() this.setTitle(title) - this.setComponents(components) + if (components) this.setComponents(components) this.setCustomId(`${name}_${customId}`) } } \ No newline at end of file