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

Message Forwarding #9950

Merged
merged 41 commits into from
Oct 11, 2024
Merged

Message Forwarding #9950

merged 41 commits into from
Oct 11, 2024

Conversation

DA-344
Copy link
Contributor

@DA-344 DA-344 commented Sep 29, 2024

Summary

redmvc said in #9892 they will not be able to continue with the PR anytime soon so I've continued their work in this PR.

This has all the previous changes in addition of:

  • PartialMessage.forward(...) method for message forwarding
  • MessageReference constructor not a breaking change
  • Moved MessageSnapshot from "Data Classes" section to "Discord Models"
  • Added MessageReferenceType enum to docs
  • .. versionadded::s where it was missing.

Related Discord API Docs PRs:

Checklist

  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes.
  • This PR fixes an issue.
  • This PR adds something new (e.g. new method or parameters).
  • This PR is a breaking change (e.g. methods or parameters removed/renamed)
  • This PR is not a code change (e.g. documentation, README, ...)

DA-344 and others added 30 commits March 20, 2024 10:59
Create enums and class attributes tracking the type of a message reference (default or forward)
Create a class to track a snapshot of a message
Add class MessageSnapshot to classes exported from message.py
Move MessageReferenceType definition in types/message.py above MessageReference typed dict
DA-344 and others added 4 commits September 29, 2024 22:00
- MessageSnapshot.cached_message now returns the correct message
- MessageReference.to_dict now passes type for forwards
- PartialMessage.forward does not raise errors thanks to the already mentioned fix
Copy link
Owner

@Rapptz Rapptz left a comment

Choose a reason for hiding this comment

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

This looks good but there are unfortunately merge conflicts.

discord/enums.py Outdated Show resolved Hide resolved
Copy link
Owner

@Rapptz Rapptz left a comment

Choose a reason for hiding this comment

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

Sorry, I forgot this PR also introduces instances of Optional[List[X]].

discord/message.py Outdated Show resolved Hide resolved
@DA-344
Copy link
Contributor Author

DA-344 commented Oct 10, 2024

Merge conflicts have been resolved and suggestions have been commited, PR is now ready to be merged.

@Rapptz
Copy link
Owner

Rapptz commented Oct 10, 2024

This has conflicts again.

@DA-344
Copy link
Contributor Author

DA-344 commented Oct 11, 2024

Fixed merge conflicts again.

@Rapptz Rapptz merged commit 99a7093 into Rapptz:master Oct 11, 2024
8 checks passed
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.

3 participants