From 3e7cb2f502b186e513b1bf0f928f594dd2ff7ee0 Mon Sep 17 00:00:00 2001 From: shtlrs Date: Mon, 10 Jul 2023 20:19:00 +0100 Subject: [PATCH] update get_or_fetch_channel's return type --- pydis_core/utils/channel.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pydis_core/utils/channel.py b/pydis_core/utils/channel.py index 854c64fd8..48adfb529 100644 --- a/pydis_core/utils/channel.py +++ b/pydis_core/utils/channel.py @@ -22,7 +22,10 @@ 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(bot: Bot, channel_id: int) -> discord.abc.GuildChannel: +async def get_or_fetch_channel( + bot: Bot, + channel_id: int +) -> discord.abc.GuildChannel | discord.abc.PrivateChannel | discord.Thread: """ Attempt to get or fetch the given ``channel_id`` from the bots cache, and return it.