predict the duccs

This commit is contained in:
vulpine 2020-09-08 19:13:17 -04:00
parent 2cfd50085c
commit 685ee1e27c
1 changed files with 16 additions and 0 deletions

16
modules/pd.py Normal file
View File

@ -0,0 +1,16 @@
async def pd(self,c,n,m):
if n in ['tildebot','BitBot','xfnw'] and m == '・゜゜・。。・゜゜\\_o< QUACK!':
self.duckmsg[c] = 0
print('duck in',c)
elif c in self.duckmsg:
self.duckmsg[c] += 1
if self.duckmsg[c] == 200:
await self.notice(self.ducknotif,'i predict there will be a duck in {} soon'.format(c))
async def init(self):
self.raw['pd'] = pd
self.ducknotif='xfnw'
self.duckmsg = {}