|
|
|
|
|
|
|
|
|
|
|
|
|
|
client = discord.Client() |
|
|
client = discord.Client() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Mushcord: |
|
|
class Mushcord: |
|
|
VERSION = '0.1.3' |
|
|
VERSION = '0.1.3' |
|
|
|
|
|
|
|
|
def __init__(self): |
|
|
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 |
|
|
@client.event |
|
|
async def on_message(message): |
|
|
|
|
|
|
|
|
async def on_message(self, message): |
|
|
if message.author == client.user: |
|
|
if message.author == client.user: |
|
|
return |
|
|
return |
|
|
if message.content.startswith('!hello'): |
|
|
if message.content.startswith('!hello'): |
|
|
|
|
|
|
|
|
mc.t.write(msg) |
|
|
mc.t.write(msg) |
|
|
|
|
|
|
|
|
@client.event |
|
|
@client.event |
|
|
async def on_ready(): |
|
|
|
|
|
|
|
|
async def on_ready(self): |
|
|
print('Logged in as') |
|
|
print('Logged in as') |
|
|
print(client.user.name) |
|
|
print(client.user.name) |
|
|
print(client.user.id) |
|
|
print(client.user.id) |