From 32b84625df9d88af26b2413e6d9f318d78f0b721 Mon Sep 17 00:00:00 2001 From: Interitio Date: Wed, 24 Sep 2025 23:12:24 +1000 Subject: [PATCH] Add delay to goal alert. --- subathon/component.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/subathon/component.py b/subathon/component.py index 719398e..8f7ae1a 100644 --- a/subathon/component.py +++ b/subathon/component.py @@ -1,3 +1,4 @@ +import asyncio import re from collections import defaultdict from datetime import datetime, timedelta @@ -84,6 +85,9 @@ class SubathonComponent(cmds.Component): for i, goal in enumerate(goals): if not goal.notified and goal.required_score <= score: # Goal completed, notify channel + # TODO: Quick hack to avoid running into ratelimits + # Should probably wait on a central messaging slow-lock bucketed by channel instead + await asyncio.sleep(1) await channel.send_message( f"We have reached Goal #{i+1}: {goal.description} !! Thank you everyone for your support <3", sender=self.bot.bot_id,