Fix Client.fetch_channel not returning Thread

This commit is contained in:
Alex Nørgaard
2021-07-04 02:35:31 +01:00
committed by GitHub
parent 097b6064f1
commit d1dc41ec2f
7 changed files with 22 additions and 15 deletions

View File

@ -715,7 +715,7 @@ class ConnectionState:
log.debug('THREAD_CREATE referencing an unknown guild ID: %s. Discarding', guild_id)
return
thread = Thread(guild=guild, data=data)
thread = Thread(guild=guild, state=guild._state, data=data)
has_thread = guild.get_thread(thread.id)
guild._add_thread(thread)
if not has_thread:
@ -735,7 +735,7 @@ class ConnectionState:
thread._update(data)
self.dispatch('thread_update', old, thread)
else:
thread = Thread(guild=guild, data=data)
thread = Thread(guild=guild, state=guild._state, data=data)
guild._add_thread(thread)
self.dispatch('thread_join', thread)