Fix Guild.fetch_channel not working for threads

This commit is contained in:
la authored and GitHub committed 2021-08-18 00:45:45 -04:00
1 parent 6b6bcb92e6
commit 8ac5cdc314
2 files changed
+13 -5

No files matched your search

+7
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