test code
crispy-caesus 114518720+crispy-caesus@users.noreply.github.com
Thu, 08 Aug 2024 22:18:24 +0200
2 files changed,
17 insertions(+),
0 deletions(-)
A
bot.py
@@ -0,0 +1,15 @@
+import discord +import bot_token + +bot = discord.Bot() + +@bot.slash_command() +async def hello(ctx, name: str = None): + name = name or ctx.author.name + await ctx.respond(f"Hello {name}!") + +@bot.user_command(name="Say Hello") +async def hi(ctx, user): + await ctx.respond(f"{ctx.author.mention} says hello to {user.name}!") + +bot.run(bot_token.token)