From 39279466cef729c2591691ef0d50d6bdeeddab25 Mon Sep 17 00:00:00 2001 From: Fleny Date: Mon, 28 Jul 2025 08:38:51 +0200 Subject: [PATCH] api-docs: Add max of 512 chars on button links (#4262) * Add max of 512 chars for button urls * Update packages/types/src/discordeno.ts Co-authored-by: Link --------- Co-authored-by: Link --- packages/types/src/discord/components.ts | 2 ++ packages/types/src/discordeno.ts | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/types/src/discord/components.ts b/packages/types/src/discord/components.ts index 8884e8265..3e23113db 100644 --- a/packages/types/src/discord/components.ts +++ b/packages/types/src/discord/components.ts @@ -118,6 +118,8 @@ export interface DiscordButtonComponent extends DiscordBaseComponent { * * @remarks * Buttons of style {@link ButtonStyles.Link | Link} must have an url, any other button with a different style can not have an url + * + * Maximum 512 characters. */ url?: string /** Whether or not this button is disabled */ diff --git a/packages/types/src/discordeno.ts b/packages/types/src/discordeno.ts index c109ba272..766c49019 100644 --- a/packages/types/src/discordeno.ts +++ b/packages/types/src/discordeno.ts @@ -178,7 +178,14 @@ export interface ButtonComponent extends BaseComponent { } /** Identifier for a purchasable SKU, only available when using premium-style buttons */ skuId?: BigString - /** optional url for link-style buttons that can navigate a user to the web. Only type 5 Link buttons can have a url */ + /** + * optional url for link-style buttons that can navigate a user to the web. + * + * @remarks + * Only {@link ButtonStyles.Link | Link} buttons can have a url. + * + * Maximum 512 characters. + */ url?: string /** Whether or not this button is disabled */ disabled?: boolean