From ad86ba7db50e003af1a3752752304fd1d2d4ed60 Mon Sep 17 00:00:00 2001 From: shahriaarrr <75499598+shahriaarrr@users.noreply.github.com> Date: Fri, 19 Feb 2021 14:43:23 +0330 Subject: [PATCH] add about command and add some comments --- src/bot.py | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/src/bot.py b/src/bot.py index 8187d4f..f8df89d 100644 --- a/src/bot.py +++ b/src/bot.py @@ -45,11 +45,11 @@ async def ban(ctx, member : discord.Member, *, reason = None ): await member.ban(reason = reason) await ctx.send(f"Banned {member.mention}") - +#say Hi @client.command() -async def salam(ctx): +async def hi(ctx): mention = ctx.author.mention - await ctx.send("salam %s" % (mention)) + await ctx.send("Hi %s🙋‍♂️" % (mention)) @client.command() @@ -58,7 +58,7 @@ async def taas(ctx): x = randint(1, 6) await ctx.send("Your number is: %i" % (x)) - +#you can set your name and pass((just a game)) @client.command() async def cmd(ctx, * ,values): values = values.split() @@ -66,7 +66,7 @@ async def cmd(ctx, * ,values): name = values[1] await ctx.send("password: "+password+"\n"+"name: "+name) - +#set your bot's status @client.command() #If you want to use a command only for admins, you must type the following command before defining the function @commands.has_permissions(manage_messages = True) @@ -85,7 +85,7 @@ async def setstatus(ctx, status_type): await client.change_presence(status = discord.Status.online) await ctx.send("status change to --> online") - +#set your bot's activity @client.command() @commands.has_permissions(manage_messages = True) async def setactivity(ctx, activity_type, * ,activity_text): @@ -170,6 +170,28 @@ async def clear(ctx, amount = 100): await ctx.send("Chat Cleared") +@client.command() +async def about(ctx): + aboutme = ''' + Hi, I'm Shahriar🙋‍♂️ + + 🤖(bot.py)'s father + + 💻Computer engineering student + + 👨‍💻Python Developer + + ✒Sometimes the author + + 🔗All links related to me: https://zil.ink/shahriaarrr12 + ''' + m1 = discord.Embed( + title = "programmer of this project", + description = aboutme, + color = 0x51F349, + ) + await ctx.send(embed = m1) + #run your bot client.run(CONFING.TOKEN)