Initial "$hello" response bot
This commit is contained in:
commit
5fe9bfed4d
17
bot.py
Normal file
17
bot.py
Normal 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")
|
||||||
Loading…
Reference in New Issue
Block a user