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(Message): Make author of referenced message nullable #5929

Merged
merged 7 commits into from Jun 28, 2021
Merged

fix(Message): Make author of referenced message nullable #5929

merged 7 commits into from Jun 28, 2021

Conversation

MahouSirin
Copy link
Contributor

@MahouSirin MahouSirin commented Jun 26, 2021

Please describe the changes this PR makes and why it should be merged:
After #5905 PR, data.referenced_message property has been added to Message class (optional, non-nullable). Actually, however, the property is also nullable. This PR makes that nullable, and fixes issue caused by non-nullable property.

2021-06-26 20251409

p.s. My english is not good. please understand if you find any wrong grammar..

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

@iShibi
Copy link
Contributor

iShibi commented Jun 27, 2021

Why pass null tho? The referenced message was deleted but this doesn't mean that the current message is not a reply to the author of that deleted referenced message anymore. We can still pass the old replied user, this is from the closed #5939:

data.referenced_message ? data.referenced_message.author : this.mentions.repliedUser

src/structures/Message.js Outdated Show resolved Hide resolved
@iCrawl iCrawl added this to the Version 13 milestone Jun 27, 2021
@iCrawl iCrawl merged commit dc671c8 into discordjs:master Jun 28, 2021
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.

None yet

6 participants