Skip to content

Commit 6896a55

Browse files
authored
fix: don't assume msg reference always has msg id (#1423)
Co-authored-by: Astrea49 <25420078+Astrea49@users.noreply.github.com>
1 parent f476863 commit 6896a55

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

interactions/models/discord/message.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ def _process_dict(cls, data: dict, client: "Client") -> dict: # noqa: C901
497497
_m = client.cache.place_message_data(ref_message_data)
498498
data["referenced_message_id"] = _m.id
499499
elif msg_reference := data.get("message_reference"):
500-
data["referenced_message_id"] = msg_reference["message_id"]
500+
data["referenced_message_id"] = msg_reference.get("message_id")
501501

502502
if "interaction" in data:
503503
data["interaction"] = MessageInteraction.from_dict(data["interaction"], client)

0 commit comments

Comments
 (0)