Skip to content

fix: mark custom_id field in button component as optional#7880

Merged
markmandel merged 1 commit into
discord:mainfrom
Helloyunho:main
May 12, 2026
Merged

fix: mark custom_id field in button component as optional#7880
markmandel merged 1 commit into
discord:mainfrom
Helloyunho:main

Conversation

@Helloyunho

Copy link
Copy Markdown
Contributor

In button component docs, it says custom_id field is not optional, even though it cannot have that field when the type is link or premium.

I was confused by this and wanted to prevent further confusion

@Helloyunho Helloyunho requested a review from a team as a code owner October 3, 2025 15:49
@Helloyunho Helloyunho requested review from abe-discord and removed request for a team October 3, 2025 15:49

@thewilloftheshadow thewilloftheshadow left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Below that table it specifically says:

Non-link and non-premium buttons must have a custom_id, and cannot have a url or a sku_id.
Link buttons must have a url, and cannot have a custom_id
So this does bring it inline with the url and sku_id having the optional identifier

@markmandel markmandel merged commit 4193cad into discord:main May 12, 2026
3 checks passed
@markmandel

Copy link
Copy Markdown
Contributor

Thanks!

xavier-archlinux-tw pushed a commit to xavier-archlinux-tw/discord-api-docs that referenced this pull request Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants