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

config.txt

+ 5
- 0
config-default.txt View File

TOKEN=
SERVER=
PORT=
USERNAME=
PASSWORD=

+ 13
- 9
mushcord.py View File



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)

Loading…
Cancel
Save