-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprog.py
More file actions
37 lines (29 loc) · 666 Bytes
/
Copy pathprog.py
File metadata and controls
37 lines (29 loc) · 666 Bytes
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
32
33
34
35
36
37
import discord
import basic
import hub
import json
with open('tokenTest.txt','r') as f:
TOKEN = f.read()
client = discord.Client()
@client.event
async def on_message(message):
# we do not want the bor to reply to itself
if message.author == client.user:
return
data = basic.headline(message)
chat = []
dat = msg = ''
if message.content.startswith('?'):
dat,msg = hub.commands(message)
data += dat
chat += msg
for msg in chat:
await client.send_message(msg[0],msg[1].format(message))
basic.log(data)
@client.event
async def on_ready():
print('Logged in as')
print(client.user.name)
print(client.user.id)
print('------')
client.run(TOKEN)