Skip to content

Commit

Permalink
Handle threads passed to ExpandChannel()
Browse files Browse the repository at this point in the history
  • Loading branch information
EthanC committed Mar 11, 2024
1 parent 04f1392 commit 00c3ca0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions helpers/responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,13 @@ def ExpandGuild(guild: Guild, format: bool = True) -> str:
def ExpandChannel(channel: GuildChannel, format: bool = True) -> str:
"""Build a reusable string for the provided channel."""

if type(channel) == GuildThreadChannel:
logger.debug(
f"GuildThreadChannel {channel} passed to ExpandChannel(), switching to ExpandThread()"
)

return Responses.ExpandThread(channel, format)

if format:
return f"`#{channel.name}` (`{channel.id}`)"

Expand Down

0 comments on commit 00c3ca0

Please sign in to comment.