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(GuildMemberManager): nick endpoint #7151

Merged
merged 3 commits into from Dec 26, 2021
Merged

fix(GuildMemberManager): nick endpoint #7151

merged 3 commits into from Dec 26, 2021

Conversation

muchnameless
Copy link
Contributor

@muchnameless muchnameless commented Dec 26, 2021

Please describe the changes this PR makes and why it should be merged:
#7104 introduced a regression to Guild#me#setNickname since communication_disabled_until is always added to _data, even if communicationDisabledUntil is undefined. Due to this Object.keys(_data).length will be 2 and the check in line 272/274 won't add @me to the endpoint.

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

Copy link
Member

@Jiralite Jiralite left a comment

Choose a reason for hiding this comment

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

Thank you for catching this!

src/managers/GuildMemberManager.js Outdated Show resolved Hide resolved
@kyranet
Copy link
Member

kyranet commented Dec 26, 2021

Object.keys(_data).length

Can't we just change that to Object.keys(data).length?

@muchnameless
Copy link
Contributor Author

@kyranet's suggestion seems the most future-proof, so I went with that

Copy link
Member

@vladfrangu vladfrangu left a comment

Choose a reason for hiding this comment

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

Are you sure Kyra's suggestion works/has it been tested? If it works, LGTM

@muchnameless
Copy link
Contributor Author

I tested it and it worked

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

6 participants