Fix goalcheck.

This commit is contained in:
2025-07-28 14:10:14 +10:00
parent 11b214b553
commit 3cd243f3eb

View File

@@ -136,7 +136,7 @@ class SubathonComponent(cmds.Component):
sender=self.bot.bot_id sender=self.bot.bot_id
) )
# TODO: Websocket update # TODO: Websocket update
await self.goalcheck() await self.goalcheck(active, bits_payload.broadcaster)
# Check goals # Check goals
@cmds.Component.listener() @cmds.Component.listener()
@@ -176,7 +176,7 @@ class SubathonComponent(cmds.Component):
) )
# TODO: Websocket update # TODO: Websocket update
# Check goals # Check goals
await self.goalcheck() await self.goalcheck(active, sub_payload.broadcaster)
@cmds.Component.listener() @cmds.Component.listener()
async def event_safe_subscription_gift(self, payload): async def event_safe_subscription_gift(self, payload):
@@ -211,7 +211,7 @@ class SubathonComponent(cmds.Component):
) )
# TODO: Websocket update # TODO: Websocket update
# Check goals # Check goals
await self.goalcheck() await self.goalcheck(active, gift_payload.broadcaster)
# end stream => Automatically pause the timer # end stream => Automatically pause the timer
@cmds.Component.listener() @cmds.Component.listener()
@@ -351,7 +351,7 @@ class SubathonComponent(cmds.Component):
await ctx.reply("No active subathon running!") await ctx.reply("No active subathon running!")
@group_goals.command(name='add') @group_goals.command(name='add')
async def cmd_add(self, ctx: cmds.Context, required: int, description: str): async def cmd_add(self, ctx: cmds.Context, required: int, *, description: str):
if ctx.broadcaster or ctx.author.moderator: if ctx.broadcaster or ctx.author.moderator:
community = await self.bot.community_fetch(twitchid=ctx.broadcaster.id, name=ctx.broadcaster.name) community = await self.bot.community_fetch(twitchid=ctx.broadcaster.id, name=ctx.broadcaster.name)
cid = community.communityid cid = community.communityid