aboutsummaryrefslogtreecommitdiff
path: root/discord/guild.py
diff options
context:
space:
mode:
authorAlex Nørgaard <[email protected]>2021-07-04 02:35:31 +0100
committerGitHub <[email protected]>2021-07-03 21:35:31 -0400
commitd1dc41ec2f6e0e6e6489151f33a39b7fccfc8f6f (patch)
tree1f3e91c728e87df04dcb32fcda5927af719004ed /discord/guild.py
parentFix ui.Button constructor default style to match the decorator (diff)
downloaddiscord.py-d1dc41ec2f6e0e6e6489151f33a39b7fccfc8f6f.tar.xz
discord.py-d1dc41ec2f6e0e6e6489151f33a39b7fccfc8f6f.zip
Fix Client.fetch_channel not returning Thread
Diffstat (limited to 'discord/guild.py')
-rw-r--r--discord/guild.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/discord/guild.py b/discord/guild.py
index 54b86b29..1cf8eef0 100644
--- a/discord/guild.py
+++ b/discord/guild.py
@@ -287,7 +287,7 @@ class Guild(Hashable):
self._members[member.id] = member
def _store_thread(self, payload: ThreadPayload, /) -> Thread:
- thread = Thread(guild=self, data=payload)
+ thread = Thread(guild=self, state=self._state, data=payload)
self._threads[thread.id] = thread
return thread
@@ -466,7 +466,7 @@ class Guild(Hashable):
if 'threads' in data:
threads = data['threads']
for thread in threads:
- self._add_thread(Thread(guild=self, data=thread))
+ self._add_thread(Thread(guild=self, state=self._state, data=thread))
@property
def channels(self) -> List[GuildChannel]: