@commands.command(aliases=['ci'])
async def channelinfo(self, ctx, channel: discord.TextChannel=None):
    if (channel == None):
        channel = ctx.channel
    em = discord.Embed(title=f'Info about {channel.name}', color=ctx.author.color, description=f'Here is an insight into {channel.mention}')
    em.add_field(name='ID:', value=f'`{channel.id}`')
    em.add_field(name='Name:', value=f'`{channel.name}`')
    em.add_field(name='Server it belongs to:', value=f'{channel.guild.name}', inline=True)
    try:
        em.add_field(name='Category ID:', value=f'`{channel.category_id}`', inline=False)
    except:
        pass
    em.add_field(name='Topic:', value=f'`{channel.topic}`')
    em.add_field(name='Slowmode:', value=f'`{channel.slowmode_delay}`', inline=True)
    em.add_field(name='People who can see the channel:', value=f'`{len(channel.members)}`', inline=False)
    em.add_field(name='Is NSFW:', value=f'`{channel.is_nsfw()}`')
    em.add_field(name='Is News:', value=f'`{channel.is_news()}`', inline=True)
    em.set_footer(text='invite me ;)', icon_url=ctx.author.avatar_url)
    em.set_thumbnail(url=str(ctx.guild.icon_url))
    em.set_author(name=ctx.author.name, icon_url=ctx.author.avatar_url)
    (await ctx.send(embed=em))
@commands.command(aliases=['ci'])
async def channelinfo(self, ctx, channel: discord.TextChannel=None):
    if (channel == None):
        channel = ctx.channel
    em = discord.Embed(title=f'Info about {channel.name}', color=ctx.author.color, description=f'Here is an insight into {channel.mention}')
    em.add_field(name='ID:', value=f'`{channel.id}`')
    em.add_field(name='Name:', value=f'`{channel.name}`')
    em.add_field(name='Server it belongs to:', value=f'{channel.guild.name}', inline=True)
    try:
        em.add_field(name='Category ID:', value=f'`{channel.category_id}`', inline=False)
    except:
        pass
    em.add_field(name='Topic:', value=f'`{channel.topic}`')
    em.add_field(name='Slowmode:', value=f'`{channel.slowmode_delay}`', inline=True)
    em.add_field(name='People who can see the channel:', value=f'`{len(channel.members)}`', inline=False)
    em.add_field(name='Is NSFW:', value=f'`{channel.is_nsfw()}`')
    em.add_field(name='Is News:', value=f'`{channel.is_news()}`', inline=True)
    em.set_footer(text='invite me ;)', icon_url=ctx.author.avatar_url)
    em.set_thumbnail(url=str(ctx.guild.icon_url))
    em.set_author(name=ctx.author.name, icon_url=ctx.author.avatar_url)
    (await ctx.send(embed=em))