Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: return only boolean for disabled #8965

Merged
merged 3 commits into from Dec 24, 2022

Conversation

MrMythicalYT
Copy link
Contributor

Please describe the changes this PR makes and why it should be merged:
This PR changes BaseSelectMenuComponent#disabled and ButtonComponent#disabled to only return booleans.

Fixes #8964
Status and versioning classification:

  • Code changes have been tested against the Discord API, or there are no code changes
  • I know how to update typings and have done so, or typings don't need updating

@vercel
Copy link

vercel bot commented Dec 23, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Ignored Deployments
Name Status Preview Comments Updated
discord-js ⬜️ Ignored (Inspect) Dec 24, 2022 at 7:27AM (UTC)
discord-js-guide ⬜️ Ignored (Inspect) Dec 24, 2022 at 7:27AM (UTC)

@ImRodry
Copy link
Contributor

ImRodry commented Dec 23, 2022

this is probably gonna get a semver:major label but I really wish it didn't lol

@kyranet
Copy link
Member

kyranet commented Dec 23, 2022

Not semver:major for the same reason as #8617: it's a valid return type, we're just narrowing the possibilities.

@Jiralite Jiralite added this to the discord.js v14.8 milestone Dec 23, 2022
@ImRodry
Copy link
Contributor

ImRodry commented Dec 23, 2022

Thought it would be major because we’re removing a possible return type but if you say it’s not then amazing!

@kyranet
Copy link
Member

kyranet commented Dec 23, 2022

To sum things up a little, the old return type is boolean | null, the new one is boolean. The new type is assignable to the old one, and that's why it's not a breaking change. ^^

@kodiakhq kodiakhq bot merged commit 6614603 into discordjs:main Dec 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

ButtonComponent#disabled is null when it should be false
6 participants