Fix Guild.fetch_channel not working for threads

This commit is contained in:
la
2021-08-18 13:45:45 +09:00
committed by GitHub
parent 6b6bcb92e6
commit 8ac5cdc314
2 changed files with 13 additions and 5 deletions

View File

@@ -2038,3 +2038,10 @@ def _threaded_channel_factory(channel_type: int):
if value in (ChannelType.private_thread, ChannelType.public_thread, ChannelType.news_thread):
return Thread, value
return cls, value
def _threaded_guild_channel_factory(channel_type: int):
cls, value = _guild_channel_factory(channel_type)
if value in (ChannelType.private_thread, ChannelType.public_thread, ChannelType.news_thread):
return Thread, value
return cls, value