#tasks.loop not working

3 messages · Page 1 of 1 (latest)

vernal star
#
@tasks.loop(hours=1)
async def gifreminder():
  pratik = client.fetch_user(766141252408049675)
  pratik.send("It's time to add a GIF.")
gifreminder.start()```

It doesn't send the message.
little drum
#

You'll need to start the timer once the event loop is started. The event loop starts when you call your bot's run function. So you need to put the gifreminder.start() call in an on ready event or a cog startup function.