improve invite logging
This commit is contained in:
parent
39a87efb0b
commit
9016a1cec4
2 changed files with 5 additions and 2 deletions
2
bot.py
2
bot.py
|
@ -35,7 +35,7 @@ class Oven(pydle.Client):
|
|||
self.modules[i] = m
|
||||
|
||||
async def on_invite(self, channel, by):
|
||||
modules['invite'].invite(self, channel, by)
|
||||
await self.modules['invite'].invite(self, channel, by)
|
||||
# print('{} invited me to {}!'.format(by, channel))
|
||||
# self.t = time.time()+1
|
||||
# await self.join(channel)
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import time
|
||||
|
||||
async def invite(self, channel, by):
|
||||
if self.db['invite'].find_one(enabled='true'):
|
||||
if self.db['invite'].find_one(blacklist=channel):
|
||||
|
@ -6,7 +8,8 @@ async def invite(self, channel, by):
|
|||
print('{} invited me to {}!'.format(by, channel))
|
||||
self.t = time.time()+1
|
||||
await self.join(channel)
|
||||
|
||||
else:
|
||||
print('ive been invited but invites are disabled')
|
||||
|
||||
|
||||
async def init(self):
|
||||
|
|
Loading…
Reference in a new issue