Skip to content

Commit

Permalink
update get_or_fetch_channel's return type
Browse files Browse the repository at this point in the history
  • Loading branch information
shtlrs committed Jul 10, 2023
1 parent df15245 commit 3e7cb2f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pydis_core/utils/channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 3e7cb2f

Please sign in to comment.