Adapt to new yaboli version

This commit is contained in:
Joscha 2018-07-29 15:21:40 +00:00
parent 9c15ed9cd0
commit a4378e3fe5

View file

@ -56,11 +56,11 @@ class PlusOne(yaboli.Bot):
Count +1s awarded to users by other users. Count +1s awarded to users by other users.
""" """
async def created(self, room): async def on_created(self, room):
room.pointsdb = PointDB(f"points-{room.roomname}.db") room.pointsdb = PointDB(f"points-{room.roomname}.db")
await room.pointsdb.initialize() await room.pointsdb.initialize()
async def send(self, room, message): async def on_send(self, room, message):
ping_text = ":bronze!?:" ping_text = ":bronze!?:"
short_help = "/me counts :+1:s" short_help = "/me counts :+1:s"
long_help = ( long_help = (
@ -84,8 +84,6 @@ class PlusOne(yaboli.Bot):
await self.trigger_plusone(room, message) await self.trigger_plusone(room, message)
forward = send
@yaboli.command("points", specific=False, args=True) @yaboli.command("points", specific=False, args=True)
async def command_points(self, room, message, argstr): async def command_points(self, room, message, argstr):
args = self.parse_args(argstr) args = self.parse_args(argstr)