Skip to content

Commit

Permalink
Rename to _raw_data
Browse files Browse the repository at this point in the history
  • Loading branch information
tibue99 committed Dec 30, 2024
1 parent bfa2e71 commit 285b522
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ 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.data` attribute.
- Added `Message._raw_data` attribute.
([#2670](https://github.com/Pycord-Development/pycord/pull/2670))

### Fixed
Expand Down
8 changes: 2 additions & 6 deletions discord/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -785,15 +785,11 @@ class Message(Hashable):
The call information associated with this message, if applicable.
.. versionadded:: 2.6
data: :class:`dict`
The data payload that was received to create this message.
.. versionadded:: 2.7
"""

__slots__ = (
"_state",
"data",
"_raw_data",
"_edited_timestamp",
"_cs_channel_mentions",
"_cs_raw_mentions",
Expand Down Expand Up @@ -847,7 +843,7 @@ def __init__(
data: MessagePayload,
):
self._state: ConnectionState = state
self.data: MessagePayload = data
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 285b522

Please sign in to comment.