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(ApplicationCommandManager): allow passing 0n to defaultMemberPermissions #8311

Merged

Conversation

almeidx
Copy link
Member

@almeidx almeidx commented Jul 18, 2022

Please describe the changes this PR makes and why it should be merged:
defaultMemberPermissions can be 0n, and it was being passed as a bigint to JSON.stringify(), which doesn't know how to serialize them

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 Jul 18, 2022

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

1 Ignored Deployment
Name Status Preview Updated
discord-js ⬜️ Ignored (Inspect) Jul 19, 2022 at 2:24PM (UTC)

Copy link
Member

@SpaceEEC SpaceEEC left a comment

Choose a reason for hiding this comment

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

Shouldn't the same fix be made for default_member_permissions (a few lines above) and in ApplicationCommand#equals too?

@Jiralite
Copy link
Member

default_member_permissions should only take a string. It's meant to represent the raw API data, which doesn't take big integers.

As for ApplicationCommand#equals(), that would be an oversight that needs changing too.

@iCrawl iCrawl merged commit 1fb7b30 into discordjs:main Jul 20, 2022
@almeidx almeidx deleted the discord.js/fix-default-member-permissions branch July 20, 2022 18:14
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.

None yet

4 participants