stricter invite ignoring

This commit is contained in:
xfnw 2020-07-24 01:31:31 +00:00
parent 789d09d88f
commit 00aabe2634

View file

@ -1,10 +1,13 @@
import time
async def invite(self, channel, by):
if self.db['invite'].find_one(blacklist=channel):
print('{} invited me to {}, a blacklisted channel'.format(by,channel))
return
if self.db['invite'].find_one(enabled='true'):
if self.db['invite'].find_one(blacklist=channel):
print('{} invited me to {}, a blacklisted channel'.format(by,channel))
return
print('{} invited me to {}!'.format(by, channel))
self.t = time.time()+1
await self.join(channel)