fixed commands

This commit is contained in:
lickthecheese 2020-04-05 19:05:07 -04:00
parent 2f9e2bd92d
commit 5784a0a1fd
3 changed files with 10 additions and 1 deletions

3
bot.py
View file

@ -38,8 +38,9 @@ class Oven(pydle.Client):
for i in self.raw:
await self.raw[i](self, chan,source,msg)
if msg[:len(self.prefix)] == self.prefix:
msg = msg[len(self.prefix):]
cmd = msg.split(' ')[0]
msg = msg[len(cmd):]
msg = msg[len(cmd)+1:]
if cmd in self.cmd:
await self.cmd[cmd](self, chan, source, msg)
async def is_admin(self, nickname):

Binary file not shown.

8
modules/admin.py Normal file
View file

@ -0,0 +1,8 @@
async def adminHandle(self, chan, source, msg):
await self.message(chan, msg)
async def init(self):
self.cmd['admin'] = adminHandle