From 9a942e867497c78e37bf323e8c0988c467e5384a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Susa=C3=B1a?= Date: Thu, 6 Jun 2024 11:23:01 -0400 Subject: [PATCH] fix: default props in components (#202) --- src/components/handler.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/handler.ts b/src/components/handler.ts index f37340a..b482357 100644 --- a/src/components/handler.ts +++ b/src/components/handler.ts @@ -173,6 +173,7 @@ export class ComponentHandler extends BaseHandler { continue; } if (!(component instanceof ModalCommand || component instanceof ComponentCommand)) continue; + component.props ??= this.client.options.commands?.defaults?.props ?? {}; if (component instanceof ModalCommand) { component.onInternalError ??= this.client.options?.modals?.defaults?.onInternalError; component.onMiddlewaresError ??= this.client.options?.modals?.defaults?.onMiddlewaresError;