diff options
| author | 2022-11-27 17:35:35 +0100 | |
|---|---|---|
| committer | 2022-11-27 17:35:35 +0100 | |
| commit | 1f592cb782e3ae7e7304cdaf8ff5dab2352b380a (patch) | |
| tree | 855e4625be4d9be4013d10d36b3aae11eed305c2 | |
| parent | Merge pull request #2342 from python-discord/don't-close-already-closed-posts (diff) | |
include Thread & PrivateChannel in get_or_fetch_channel return types
| -rw-r--r-- | bot/utils/channel.py | 4 | 
1 files changed, 3 insertions, 1 deletions
| 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}.") | 
