Skip to content

Commit c37e116

Browse files
tibue99Paillat-dev
andauthored
feat: add Message._raw_data (#2670)
Signed-off-by: Timo <[email protected]> Co-authored-by: Paillat <[email protected]>
1 parent 6937df6 commit c37e116

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ These changes are available on the `master` branch, but have not yet been releas
3636
`Permissions.use_external_sounds`, and
3737
`Permissions.view_creator_monetization_analytics`.
3838
([#2620](https://github.com/Pycord-Development/pycord/pull/2620))
39+
- Added `Message._raw_data` attribute.
40+
([#2670](https://github.com/Pycord-Development/pycord/pull/2670))
3941
- Added helper methods to determine the authorizing party of an `Interaction`.
4042
([#2659](https://github.com/Pycord-Development/pycord/pull/2659))
4143
- Added `VoiceMessage` subclass of `File` to allow voice messages to be sent.

discord/message.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -789,6 +789,7 @@ class Message(Hashable):
789789

790790
__slots__ = (
791791
"_state",
792+
"_raw_data",
792793
"_edited_timestamp",
793794
"_cs_channel_mentions",
794795
"_cs_raw_mentions",
@@ -842,6 +843,7 @@ def __init__(
842843
data: MessagePayload,
843844
):
844845
self._state: ConnectionState = state
846+
self._raw_data: MessagePayload = data
845847
self.id: int = int(data["id"])
846848
self.webhook_id: int | None = utils._get_as_snowflake(data, "webhook_id")
847849
self.reactions: list[Reaction] = [

0 commit comments

Comments
 (0)