From 5fe9bfed4df43bec8b956515beb2acadb5c12ad2 Mon Sep 17 00:00:00 2001 From: DWW Date: Sun, 13 Feb 2022 21:24:13 +0200 Subject: [PATCH] Initial "$hello" response bot --- bot.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 bot.py diff --git a/bot.py b/bot.py new file mode 100644 index 0000000..776e06b --- /dev/null +++ b/bot.py @@ -0,0 +1,17 @@ +import discord + +client = discord.Client() + +@client.event +async def on_ready(): + print("We have logged in as {0.user}".format(client)) + +@client.event +async def on_message(message): + if message.author == client.user: + return + + if message.content.startswith("$hello"): + await message.channel.send("Hello!") + +client.run("OTQyNDk2ODcwMzQ3OTk3MjQ1.YglWnA.XWmDCAuqtaLYKArJPxgyKscxB_8")