diff --git a/utils/discord_utils.py b/utils/discord_utils.py index 7146231..0fab5f5 100644 --- a/utils/discord_utils.py +++ b/utils/discord_utils.py @@ -59,6 +59,9 @@ def _(guild) -> str: return f"{guild.name}({guild.id})" -@to_string.register(discord.abc.GuildChannel) +# Even though these types are all subclasses of discord.abc.GuildChannel, it does not work if we register that class directly +@to_string.register(discord.TextChannel) +@to_string.register(discord.VoiceChannel) +@to_string.register(discord.CategoryChannel) def _(channel) -> str: return f"{channel.name}({channel.id})"