fix bot not responding to privmsg

This commit is contained in:
lickthecheese 2020-04-07 11:22:15 -04:00
parent e33708d70b
commit 63c6c8da1a
3 changed files with 3 additions and 1 deletions

2
bot.py
View file

@ -56,6 +56,8 @@ class Oven(pydle.Client):
return admin
async def on_private_message(self, trash, source, msg):
await self.on_message(source, source, msg)
if __name__ == "__main__":

View file

@ -60,7 +60,7 @@ async def invsee(self, c, n, m):
await self.message(c, 'you look through your kitchen and see {}, with a combined value of ${}'.format(' '.join(it), sum([self.bakedGoods[i] for i in it if i in self.bakedGoods])/10))
async def generate(self, c, n, m):
if int(random.uniform(0,20)) == 1:
if int(random.uniform(0,30)) == 1:
inv = self.db['inv']
inv.insert(dict(name=n, item=random.choice(list(self.bakedGoods.keys()))))
qed = self.db['qed']