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

feat(Message): add ReplyMessageOptions for #reply #5296

Merged
merged 2 commits into from May 10, 2021

Conversation

iShibi
Copy link
Contributor

@iShibi iShibi commented Feb 5, 2021

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

  1. The options parameter for Message#reply has a replyTo field. This field later gets set to this inside the method. This begs the question that why even expose the replyTo option to the end-user at all in this case. This PR creates a new type ReplyMessageOptions that replaces MessageOptions parameter for Message#reply method. This new type for options has all the fields that are in MessageOptions except the replyTo field.

  2. Docs show the default value for repliedUser in MessageMentionOptions as none, but Message#reply does ping the author of the referenced message by default. The PR also fixes that.

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
  • This PR changes the library's interface (methods or parameters added)
  • This PR includes breaking changes (methods removed or renamed, parameters moved or removed)

typings/index.d.ts Outdated Show resolved Hide resolved
@iShibi
Copy link
Contributor Author

iShibi commented Apr 30, 2021

Just wanna say that when this PR was first created it only removed the replyTo field. Then, Discord released the fail_if_not_exists option, which made it dependent on #5298. As, a result this PR won't work on its own and will need #5298 to be merged first. This will also help in overwriting the doc changes that were needed in that PR but are redundant because of the changes made here.

@iCrawl
Copy link
Member

iCrawl commented May 10, 2021

You'll need to rebase this now @iShibi

@iShibi
Copy link
Contributor Author

iShibi commented May 10, 2021

Rebase done. I hope I did it correctly 🤞

@iCrawl iCrawl merged commit 7ce741d into discordjs:master May 10, 2021
@iShibi iShibi deleted the reply-msg-options branch May 14, 2021 09:34
@iCrawl iCrawl added this to the Version 13 milestone Jun 27, 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

8 participants