From 168d525bc63d36912b9b6a39f1fc838322620327 Mon Sep 17 00:00:00 2001 From: Rushil Umaretiya <2023rumareti@tjhsst.edu> Date: Wed, 28 Oct 2020 20:52:06 -0400 Subject: [PATCH] added extra commands --- bot.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/bot.py b/bot.py index e55832c..6976ce4 100644 --- a/bot.py +++ b/bot.py @@ -19,7 +19,7 @@ ADMIN_ROLE = os.getenv('ADMIN_ROLE') STUDENT_ROLE = os.getenv('STUDENT_ROLE') intents = discord.Intents.all() -bot = commands.Bot(command_prefix='$', intents=intents) +bot = commands.Bot(command_prefix='.', intents=intents) @bot.event async def on_ready(): @@ -121,6 +121,22 @@ async def info(ctx, username): print(schedule) await ctx.send('\n'.join([f"{i}: {info[i]}" for i in info])) +@bot.command() +@commands.has_role(ADMIN_ROLE) +async def ping(ctx) : + await ctx.send(f"🏓 Pong with {str(round(client.latency, 2))}") + +@bot.command(name="whoami") +@commands.has_role(ADMIN_ROLE) +async def whoami(ctx) : + await ctx.send(f"You are {ctx.message.author.name}") + +@bot.command() +@commands.has_role(ADMIN_ROLE) +async def clear(ctx, amount=3) : + await ctx.channel.purge(limit=amount) + + @bot.command(name='99', help='Responds with a random quote from Brooklyn 99') async def nine_nine(ctx): brooklyn_99_quotes = [