From a7967b9f97d1db1a8002e41e4c0df89a9b15678d Mon Sep 17 00:00:00 2001 From: ave Date: Tue, 24 May 2022 23:17:55 +0200 Subject: [PATCH] fix robocronp --- robocop_ng/cogs/robocronp.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/robocop_ng/cogs/robocronp.py b/robocop_ng/cogs/robocronp.py index 97eea2e..78ed841 100644 --- a/robocop_ng/cogs/robocronp.py +++ b/robocop_ng/cogs/robocronp.py @@ -1,4 +1,3 @@ -import asyncio import config import time import discord @@ -120,6 +119,7 @@ class Robocronp(Cog): @tasks.loop(minutes=1) async def minutely(self): + await self.bot.wait_until_ready() log_channel = self.bot.get_channel(config.botlog_channel) try: ctab = get_crontab() @@ -140,6 +140,7 @@ class Robocronp(Cog): @tasks.loop(hours=1) async def hourly(self): + await self.bot.wait_until_ready() log_channel = self.bot.get_channel(config.botlog_channel) try: await self.send_data() @@ -154,6 +155,7 @@ class Robocronp(Cog): @tasks.loop(hours=24) async def daily(self): + await self.bot.wait_until_ready() log_channel = self.bot.get_channel(config.botlog_channel) try: # Reset verification and algorithm