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,