From a6d8676c000632341acfc19108e65763031d6aa0 Mon Sep 17 00:00:00 2001 From: Felix Date: Sun, 9 Jun 2024 12:41:13 +0200 Subject: [PATCH 1/2] feat(constants): Updated ComponentButton --- src/constants.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/constants.ts b/src/constants.ts index 010909d4..018cf4cb 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -899,11 +899,11 @@ export interface ComponentButton { /** The type of component to use. */ type: ComponentType.BUTTON; /** The style of button to show. */ - style: ButtonStyle.PRIMARY | ButtonStyle.SECONDARY | ButtonStyle.SUCCESS | ButtonStyle.DESTRUCTIVE; + style: ButtonStyle.PRIMARY | ButtonStyle.SECONDARY | ButtonStyle.SUCCESS | ButtonStyle.DESTRUCTIVE | ButtonStyle.DANGER; /** The identifier for this button. */ custom_id: string; /** The label of the button. */ - label: string; + label?: string; /** The emoji to show inside the button. */ emoji?: PartialEmoji; /** Whether this button will show as disabled. */ From d753e782b00d2d1cad88c9db9f89af6d8a0e5766 Mon Sep 17 00:00:00 2001 From: Felix Date: Sun, 9 Jun 2024 13:00:00 +0200 Subject: [PATCH 2/2] style: reformat code --- src/constants.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/constants.ts b/src/constants.ts index 018cf4cb..8daed8ad 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -899,7 +899,12 @@ export interface ComponentButton { /** The type of component to use. */ type: ComponentType.BUTTON; /** The style of button to show. */ - style: ButtonStyle.PRIMARY | ButtonStyle.SECONDARY | ButtonStyle.SUCCESS | ButtonStyle.DESTRUCTIVE | ButtonStyle.DANGER; + style: + | ButtonStyle.PRIMARY + | ButtonStyle.SECONDARY + | ButtonStyle.SUCCESS + | ButtonStyle.DESTRUCTIVE + | ButtonStyle.DANGER; /** The identifier for this button. */ custom_id: string; /** The label of the button. */