From 1f592cb782e3ae7e7304cdaf8ff5dab2352b380a Mon Sep 17 00:00:00 2001 From: shtlrs Date: Sun, 27 Nov 2022 17:35:35 +0100 Subject: include Thread & PrivateChannel in get_or_fetch_channel return types --- bot/utils/channel.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bot/utils/channel.py b/bot/utils/channel.py index 821a3732a..20f433a3f 100644 --- a/bot/utils/channel.py +++ b/bot/utils/channel.py @@ -48,7 +48,9 @@ def is_in_category(channel: discord.TextChannel, category_id: int) -> bool: return getattr(channel, "category_id", None) == category_id -async def get_or_fetch_channel(channel_id: int) -> discord.abc.GuildChannel: +async def get_or_fetch_channel( + channel_id: int +) -> discord.abc.GuildChannel | discord.abc.PrivateChannel | discord.Thread: """Attempt to get or fetch a channel and return it.""" log.trace(f"Getting the channel {channel_id}.") -- cgit v1.2.3