move activity task starter into 'on_ready' event
All checks were successful
Build and Push Docker Image / build (push) Successful in 13s
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:
parent
cf580d741d
commit
cffe8546c1
@ -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):
|
||||
|
Reference in New Issue
Block a user