-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbot.py
executable file
·31 lines (26 loc) · 869 Bytes
/
bot.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/python3.6
""" Bot Discord """
import discord
import os
client = discord.Client()
@client.event
async def on_ready():
print('Logged in as')
print(client.user.name)
print(client.user.id)
print('------')
@client.event
async def on_message(message):
if message.author == client.user:
return
if (message.content.startswith(">")):
if (message.content.startswith(">repete")):
tmp = await client.send_message(message.channel, message.content[7:])
if (message.content.startswith(">ping")):
print("ping")
os.system("ping -c 1 8.8.8.8 > coucou")
file = open("coucou", "r")
await client.send_message(message.channel,file.read())
if (message.content.startswith(">mp")):
await client.send_message(message.author, "hey pd")
client.run("token")