From b70faa8fd14c12c97b0e5eadca73ac7c75543303 Mon Sep 17 00:00:00 2001 From: ziro Date: Thu, 6 Aug 2020 10:44:55 +0700 Subject: + Added desc for help cmd and serverinfo command --- cogs/general.py | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'cogs/general.py') diff --git a/cogs/general.py b/cogs/general.py index 45f8e0f..57dbbc1 100644 --- a/cogs/general.py +++ b/cogs/general.py @@ -8,13 +8,32 @@ class General(commands.Cog): @commands.command() async def add(self, ctx): + """Show link to invite ziBot.""" oauth_link = "https://discord.com/oauth2/authorize?client_id=740122842988937286&scope=bot" await ctx.send(f"To add ziBot to your server, click here: \n {oauth_link}") @commands.command() async def source(self, ctx): + """Show link to ziBot's source code.""" git_link = "https://github.com/null2264/ziBot" - await ctx.send(f"ziBot's Source Code: \n {git_link}") + await ctx.send(f"ziBot's source code: \n {git_link}") + + @commands.command() + async def serverinfo(self, ctx): + """Show server information""" + embed = discord.Embed( + title=f"{ctx.guild.name} Information", + colour=discord.Colour.orange() + ) + # embed.set_author(name=f"{ctx.guild.name} Information") + embed.set_thumbnail(url=ctx.guild.icon_url) + _emoji="" + member_count=len(ctx.guild.members) + embed.add_field(name="Members",value=f"{member_count}") + for emoji in ctx.guild.emojis: + _emoji+= ", ".join([f"{str(emoji)}"]) + embed.add_field(name="Emojis",value=f"{_emoji}") + await ctx.send(embed=embed) def setup(bot): bot.add_cog(General(bot)) -- cgit v1.2.3