move activity task starter into 'on_ready' event
All checks were successful
Build and Push Docker Image / build (push) Successful in 13s

it was being started before the bot websocket was established
This commit is contained in:
Corban-Lee Jones 2024-12-06 17:17:30 +00:00
parent cf580d741d
commit cffe8546c1

View File

@ -19,7 +19,11 @@ class ActivityCog(commands.Cog):
"""
def __init__(self, bot: commands.Bot):
self.bot = bot
self.update_activity.start()
@commands.Cog.listener()
async def on_ready(self):
if not self.update_activity.is_running():
self.update_activity.start()
@tasks.loop(seconds=30)
async def update_activity(self):