mirror of
https://gitlab.com/MisterBiggs/multi-bot-tutorial.git
synced 2025-06-16 07:06:51 +00:00
discord bot boilerplate
This commit is contained in:
parent
fe4ffba031
commit
f2fcc040fe
@ -0,0 +1,21 @@
|
||||
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("your token here")
|
||||
|
Loading…
x
Reference in New Issue
Block a user