瀏覽代碼

Turns out the @client functions really don't want a 'self' argument

master
Noëlle Anthony 5 年之前
父節點
當前提交
906dafa5ba
共有 1 個檔案被更改,包括 3 行新增3 行删除
  1. 3
    3
      mushcord.py

+ 3
- 3
mushcord.py 查看文件

@@ -14,7 +14,7 @@ class Mushcord:
config = {}
for option in options:
o = option.strip("\n").split('=')
config[o[0]] = config[o[1]]
config[o[0]] = o[1]
self.TOKEN = config['TOKEN']
self.server = config['SERVER']
self.port = int(config['PORT'])
@@ -22,7 +22,7 @@ class Mushcord:
self.password = config['PASSWORD']
@client.event
async def on_message(self, message):
async def on_message(message):
if message.author == client.user:
return
if message.content.startswith('!hello'):
@@ -60,7 +60,7 @@ class Mushcord:
mc.t.write(msg)

@client.event
async def on_ready(self):
async def on_ready():
print('Logged in as')
print(client.user.name)
print(client.user.id)

Loading…
取消
儲存