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

types: remove newMessage partial on messageUpdate event typing #10526

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Amgelo563
Copy link
Contributor

@Amgelo563 Amgelo563 commented Sep 30, 2024

Please describe the changes this PR makes and why it should be merged:
According to discord/discord-api-docs#7017 the message update payload is no longer a partial object, but rather the full message object. As such, the ClientEvents#messageUpdate's newMessage shouldn't be typed as a partial anymore, which is what this PR modifies.

It also applies the OmitPartialGroupDMChannel generic to both messages, since this event won't be triggered from group DMs.

Closes #10525.

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

vercel bot commented Sep 30, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
discord-js ⬜️ Ignored (Inspect) Visit Preview Oct 1, 2024 7:07pm
discord-js-guide ⬜️ Ignored (Inspect) Visit Preview Oct 1, 2024 7:07pm

@imnaiyar
Copy link
Contributor

imnaiyar commented Sep 30, 2024

Since this pr updates the message related event types, I think we can go ahead and also refactor it to omit PartialGroupDMChannel (as it is for it's sister counterparts) using OmitPartialGroupDMChannel as this event will never be fired from a group dm (I wonder why that wasn't done already 🤔)

@Amgelo563
Copy link
Contributor Author

You're right, not sure how I missed that, thanks!

@Amgelo563 Amgelo563 force-pushed the feat/message-update-not-partial branch from 29e3b56 to 44f2aef Compare October 1, 2024 19:07
@Amgelo563
Copy link
Contributor Author

Rebased with master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

Message updates new message shouldn't be partial
4 participants