#when I try to make a discord task. my bot doesn't seem to start the tasks.loop.

1 messages · Page 1 of 1 (latest)

timber siren
#

when I try to make a discord task. my bot doesn't seem to start the tasks.loop. Did something change?

    def __init__(self, bot):
        self.bot = bot
        self.updatepost.start()

  @tasks.loop(minutes=1440)
  async def updatepost(self):
    #something
#

dont mind the indentation

#

I tried adding the before loop

    @updatepost.before_loop
    async def before_updatepost(self):
        print('waiting...')
        await self.bot.wait_until_ready()

this worked fine

scenic topaz
#

your bot is a commands.Bot? and your class is a commands.Cog?

scenic topaz
#

@timber siren