|
|
|
|
|
|
|
|
config = {} |
|
|
config = {} |
|
|
for option in options: |
|
|
for option in options: |
|
|
o = option.strip("\n").split('=') |
|
|
o = option.strip("\n").split('=') |
|
|
config[o[0]] = config[o[1]] |
|
|
|
|
|
|
|
|
config[o[0]] = o[1] |
|
|
self.TOKEN = config['TOKEN'] |
|
|
self.TOKEN = config['TOKEN'] |
|
|
self.server = config['SERVER'] |
|
|
self.server = config['SERVER'] |
|
|
self.port = int(config['PORT']) |
|
|
self.port = int(config['PORT']) |
|
|
|
|
|
|
|
|
self.password = config['PASSWORD'] |
|
|
self.password = config['PASSWORD'] |
|
|
|
|
|
|
|
|
@client.event |
|
|
@client.event |
|
|
async def on_message(self, message): |
|
|
|
|
|
|
|
|
async def on_message(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(self): |
|
|
|
|
|
|
|
|
async def on_ready(): |
|
|
print('Logged in as') |
|
|
print('Logged in as') |
|
|
print(client.user.name) |
|
|
print(client.user.name) |
|
|
print(client.user.id) |
|
|
print(client.user.id) |