Initial "$hello" response bot

This commit is contained in:
DWW 2022-02-13 21:24:13 +02:00
commit 5fe9bfed4d

17
bot.py Normal file
View File

@ -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")