Skip to content

Commit

Permalink
feat: add Message._raw_data (#2670)
Browse files Browse the repository at this point in the history
Signed-off-by: Timo <[email protected]>
Co-authored-by: Paillat <[email protected]>
  • Loading branch information
tibue99 and Paillat-dev authored Dec 30, 2024
1 parent 6937df6 commit c37e116
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ These changes are available on the `master` branch, but have not yet been releas
`Permissions.use_external_sounds`, and
`Permissions.view_creator_monetization_analytics`.
([#2620](https://github.com/Pycord-Development/pycord/pull/2620))
- Added `Message._raw_data` attribute.
([#2670](https://github.com/Pycord-Development/pycord/pull/2670))
- Added helper methods to determine the authorizing party of an `Interaction`.
([#2659](https://github.com/Pycord-Development/pycord/pull/2659))
- Added `VoiceMessage` subclass of `File` to allow voice messages to be sent.
Expand Down
2 changes: 2 additions & 0 deletions discord/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -789,6 +789,7 @@ class Message(Hashable):

__slots__ = (
"_state",
"_raw_data",
"_edited_timestamp",
"_cs_channel_mentions",
"_cs_raw_mentions",
Expand Down Expand Up @@ -842,6 +843,7 @@ def __init__(
data: MessagePayload,
):
self._state: ConnectionState = state
self._raw_data: MessagePayload = data
self.id: int = int(data["id"])
self.webhook_id: int | None = utils._get_as_snowflake(data, "webhook_id")
self.reactions: list[Reaction] = [
Expand Down

0 comments on commit c37e116

Please sign in to comment.