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 support for crossposting #4105

Merged
merged 14 commits into from Sep 13, 2020

Conversation

CyberiumShadow
Copy link
Contributor

@CyberiumShadow CyberiumShadow commented Apr 19, 2020

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

This PR adds supports for bots to crosspost messages in News Channels.

This resolves #4089 however is currently undocumented as per discord/discord-api-docs#1510

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.

src/structures/Message.js Outdated Show resolved Hide resolved
typings/index.d.ts Show resolved Hide resolved
src/structures/Message.js Outdated Show resolved Hide resolved
src/structures/Message.js Outdated Show resolved Hide resolved
Copy link
Contributor

@jo3-l jo3-l left a comment

Choose a reason for hiding this comment

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

Slight typo in the example.

src/structures/Message.js Outdated Show resolved Hide resolved
CyberiumShadow and others added 2 commits May 12, 2020 02:05
Co-authored-by: Advaith <advaithj1@gmail.com>
Co-authored-by: Joe <56809242+Jo3-L@users.noreply.github.com>
@bsian03
Copy link

bsian03 commented May 13, 2020

Just before this gets merged, there's another endpoint to be added, see here

@HarmoGlace
Copy link
Contributor

When will it be merged ?

@almostSouji
Copy link
Member

almostSouji commented Aug 9, 2020

when ever discord decides to document it (see the linked pull request on discord docs), as that signals "this is now completely implemented and (hopefully) won't change heavily going forward"

@CyberiumShadow
Copy link
Contributor Author

Also when I decide to spend some time implementing the method to follow an announcements channel unless someone wants to PR that to my branch themselves

@iCrawl iCrawl marked this pull request as draft August 12, 2020 10:36
@iCrawl
Copy link
Member

iCrawl commented Aug 12, 2020

You could just fully read the message you liked from @almostSouji

@CyberiumShadow
Copy link
Contributor Author

CyberiumShadow commented Aug 12, 2020

I know, I read it. In the PR for the developer docs there is the followers endpoint but I don't see it here. Will it be added ?

Eventually yes, I’m burnt out from discord development again so it might be a while until I personally add it to this PR.
Eitherway, there is still time regardless as Discord themselves are not officially supporting the endpoint yet.

Like I said earlier, you can wait for me to add it, or add it to my fork/branch via another PR which will show up here as well or add it yourself in a seperate PR

@advaith1
Copy link
Contributor

advaith1 commented Sep 7, 2020

docs pr merged 🎉

@kyranet kyranet marked this pull request as ready for review September 8, 2020 06:29
src/structures/Message.js Outdated Show resolved Hide resolved
Co-authored-by: Jan <66554238+Vaporox@users.noreply.github.com>
@iCrawl iCrawl merged commit bcb7c72 into discordjs:master Sep 13, 2020
@almostSouji almostSouji mentioned this pull request Sep 22, 2020
@CyberiumShadow CyberiumShadow deleted the feat-crossposting branch September 30, 2020 22:30
@TheNoob27
Copy link

since the post request returns the data of the message after being crossposted, shouldn't you update the message data? or will discord send a message update event after crossposting?

@vaporoxx
Copy link
Contributor

There are no Message properties that change after crossposting, so I don't see why it should.

@wasdennnoch
Copy link
Contributor

The message flags update to reflect that the message was crossposted; I believe that also fires a messageUpdate.

@TheNoob27
Copy link

Okay nvm i've checked, a messageUpdate event is fired

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.

Support crossposting