Skip to content

Commit 8cec636

Browse files
authored
fix: pass proper state to interaction._guild (Pycord-Development#2411)
1 parent fbd9d7e commit 8cec636

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ These changes are available on the `master` branch, but have not yet been releas
3232
([#2400](https://github.com/Pycord-Development/pycord/pull/2400))
3333
- Fixed `ScheduledEvent.subscribers` behavior with `limit=None`.
3434
([#2407](https://github.com/Pycord-Development/pycord/pull/2407))
35+
- Fixed invalid data being passed to `Interaction._guild` in certain cases.
36+
([#2411](https://github.com/Pycord-Development/pycord/pull/2411))
3537

3638
### Changed
3739

discord/interactions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ def _from_data(self, data: InteractionPayload):
198198
self._guild: Guild | None = None
199199
self._guild_data = data.get("guild")
200200
if self.guild is None and self._guild_data:
201-
self._guild = Guild(data=self._guild_data, state=self)
201+
self._guild = Guild(data=self._guild_data, state=self._state)
202202

203203
# TODO: there's a potential data loss here
204204
if self.guild_id:

0 commit comments

Comments
 (0)