def info_channel(self, ctx, channel: union(discord.TextChannel, discord.VoiceChannel)=None):
"""Shows info about a voice or text channel."""
if channel is None:
channel = ctx.channel
embed_type = 'text_channel_embed' if isinstance(channel, discord.TextChannel) else 'voice_channel_embed'
channel_embed = getattr(self, embed_type)(channel)
channel_embed.colour = self.bot.colour
await ctx.send(embed=channel_embed)
评论列表
文章目录