Skip to content

Conversation

@PASTUSEDBY
Copy link
Contributor

Please describe the changes this PR makes and why it should be merged:

According to #4640, the .nickname property of a guildmember returns undefined instead of null if not present.
This might be due to the way the library currently handles and assigns the initial data payload received from Discord itself.

Status

  • 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

Semantic versioning classification:

  • This PR changes the library's interface (methods or parameters added)
    • This PR includes breaking changes (methods removed or renamed, parameters moved or removed)
  • This PR only includes non-code changes, like changes to documentation, README, etc.

**Please describe the changes this PR makes and why it should be merged:**

* closes discordjs#4640

According to discordjs#4640, the `.nickname` property of a guildmember returns `undefined` instead of `null` if not present.
This might be due to the way the library currently handles and assigns the initial `data` payload received from Discord itself.

**Status**

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

**Semantic versioning classification:**

- [ ] This PR changes the library's interface (methods or parameters added)
     - [ ] This PR includes breaking changes (methods removed or renamed, parameters moved or removed)
 - [ ] This PR only includes non-code changes, like changes to documentation, README, etc.
@PASTUSEDBY PASTUSEDBY changed the title fix: set #nickname null as the default value fix: set #nickname to null as the default value Jul 17, 2020
@iCrawl iCrawl merged commit 2adb581 into discordjs:master Aug 11, 2020
@PASTUSEDBY PASTUSEDBY deleted the patch-1 branch August 12, 2020 06:38
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.

GuildMember.nickname has incorrect typings

4 participants