Explorar el Código

Initial commit

tags/1.0
Rocketsoup hace 4 años
padre
commit
ee3227875a
Se han modificado 1 ficheros con 17 adiciones y 0 borrados
  1. 17
    0
      rocketbot.py

+ 17
- 0
rocketbot.py Ver fichero

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

Loading…
Cancelar
Guardar