Browse Source

Okay NOW add the code

master
Noëlle Anthony 5 years ago
parent
commit
0851311bbb
3 changed files with 19 additions and 9 deletions
  1. 1
    0
      .gitignore
  2. 5
    0
      config-default.txt
  3. 13
    9
      mushcord.py

+ 1
- 0
.gitignore View File

@@ -0,0 +1 @@
config.txt

+ 5
- 0
config-default.txt View File

@@ -0,0 +1,5 @@
TOKEN=
SERVER=
PORT=
USERNAME=
PASSWORD=

+ 13
- 9
mushcord.py View File

@@ -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)

Loading…
Cancel
Save