Add support for message snapshots used in message forwarding
Summary
Message forwarding was introduced on July 18, 2024. Messages now have a new optional parameter, message_snapshots, which is an array of Message Snapshots containing immutable snapshots of a message being forwarded. Such messages will, additionally, always have a reference to the message being forwarded, and that reference will have type = 1.
This PR adds a MessageSnapshot class and a message_snapshots parameter to the Message class. It also adds the type parameter to the MessageReference class, in order to track whether a reference is a reply or a forward.
Checklist
- [x] If code changes were made then they have been tested.
- [x] I have updated the documentation to reflect the changes.
- [ ] This PR fixes an issue.
- [x] 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, ...)
Can't this use the existing Message class? With a potential _from_snapshot classmethod
Message snapshots don't have all Message information; in particular, they don't have an author.
As new PR opened on Discord's side, this is missing following fields in MessageSnapshot: stickers, sticker_items, and components.
Sorry, it's unlikely I'll be able to resume work on this PR anytime soon. If anybody wants to take the code, I encourage it.
Superseded by #9950