From fee6679ff20413aab14d5c061d48a402c180856c Mon Sep 17 00:00:00 2001 From: dnns01 <mail@dnns01.de> Date: Wed, 9 Dec 2020 19:33:20 +0100 Subject: [PATCH] fix $11e - wait with motivation loop until bot is ready --- text_commands_cog.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/text_commands_cog.py b/text_commands_cog.py index d6f8051..ca344c6 100644 --- a/text_commands_cog.py +++ b/text_commands_cog.py @@ -166,3 +166,7 @@ class TextCommandsCog(commands.Cog): await channel.send(random.choice(texts)) self.motivation_loop.change_interval(hours=1 + (random.random() * 12)) + + @motivation_loop.before_loop + async def before_motivation_loop(self): + await self.bot.wait_until_ready() -- GitLab