From b816bdba1e724a1a1145640941ffadd1860414b8 Mon Sep 17 00:00:00 2001 From: Pranjal Gupta <107236387+pranjalgupta32@users.noreply.github.com> Date: Sun, 25 Jun 2023 12:47:40 -0400 Subject: [PATCH] Create Discord bot uses This is an example of using discord bot token. --- Discord bot uses | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 Discord bot uses diff --git a/Discord bot uses b/Discord bot uses new file mode 100644 index 00000000..ab592423 --- /dev/null +++ b/Discord bot uses @@ -0,0 +1,15 @@ +import discord +from discord.ext import commands + +bot = commands.Bot(command_prefix='!') + +@bot.event +async def on_ready(): + print(f'Logged in as {bot.user.name} ({bot.user.id})') + print('------') + +@bot.command() +async def hello(ctx): + await ctx.send('Hello, I am your Discord bot!') + +bot.run('BOT_TOKEN')