Bläddra i källkod

Initial commit

tags/1.0
Rocketsoup 4 år sedan
förälder
incheckning
ee3227875a
1 ändrade filer med 17 tillägg och 0 borttagningar
  1. 17
    0
      rocketbot.py

+ 17
- 0
rocketbot.py Visa fil

@@ -0,0 +1,17 @@
1
+import discord
2
+
3
+client = discord.Client()
4
+
5
+@client.event
6
+async def on_ready():
7
+    print('We have logged in as {0.user}'.format(client))
8
+
9
+@client.event
10
+async def on_message(message):
11
+    if message.author == client.user:
12
+        return
13
+
14
+    if message.content.startswith('$hello'):
15
+        await message.channel.send('Hello!')
16
+
17
+client.run('bot token')

Laddar…
Avbryt
Spara