Skip to content

Commit

Permalink
Fix custom_id field
Browse files Browse the repository at this point in the history
Pycord-Development#1040 added a custom_id field to interactions, however it is accessed wrongly causing it to always be None.
  • Loading branch information
unrealintegers authored Feb 25, 2022
1 parent 0b54eee commit 1ceaeb3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion discord/interactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def _from_data(self, data: InteractionPayload):
self.application_id: int = int(data["application_id"])
self.locale: Optional[str] = data.get("locale")
self.guild_locale: Optional[str] = data.get("guild_locale")
self.custom_id: Optional[str] = data.get("custom_id")
self.custom_id: Optional[str] = self.data.get("custom_id") if self.data is not None else None

self.message: Optional[Message]
try:
Expand Down

0 comments on commit 1ceaeb3

Please sign in to comment.