|
|
@@ -5,20 +5,24 @@ import sys, os |
|
|
|
|
|
|
|
client = discord.Client() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Mushcord: |
|
|
|
VERSION = '0.1.3' |
|
|
|
|
|
|
|
def __init__(self): |
|
|
|
self.TOKEN = 'NDc1NzIzMTg2NTUwNjAzNzkz.DkjMAw.ZH9FM4VxY4lieOp_Fl3JmHovx_o' |
|
|
|
self.server = 'saminga.oyving.org' |
|
|
|
self.port = 6250 |
|
|
|
self.username = "mushcord" |
|
|
|
self.password = "g3licht3n!" |
|
|
|
with open('config.txt', 'r+') as file: |
|
|
|
options = file.readlines() |
|
|
|
config = {} |
|
|
|
for option in options: |
|
|
|
o = option.split('=') |
|
|
|
config[o[0]] = config[o[1]] |
|
|
|
self.TOKEN = config['TOKEN'] |
|
|
|
self.server = config['SERVER'] |
|
|
|
self.port = int(config['PORT']) |
|
|
|
self.username = config['USERNAME'] |
|
|
|
self.password = config['PASSWORD'] |
|
|
|
|
|
|
|
@client.event |
|
|
|
async def on_message(message): |
|
|
|
async def on_message(self, message): |
|
|
|
if message.author == client.user: |
|
|
|
return |
|
|
|
if message.content.startswith('!hello'): |
|
|
@@ -56,7 +60,7 @@ class Mushcord: |
|
|
|
mc.t.write(msg) |
|
|
|
|
|
|
|
@client.event |
|
|
|
async def on_ready(): |
|
|
|
async def on_ready(self): |
|
|
|
print('Logged in as') |
|
|
|
print(client.user.name) |
|
|
|
print(client.user.id) |