The goal of my bot is to grab info from another site and send a message. For whatever reason my bot is able to send a message at the right time everyday but the message is not getting updated.
@bot.event
async def on_ready():
print ('logged in')
msg1.start()
@tasks.loop(hours=24)
async def msg1():
activity = []
update_info(activity)
channel = bot.get_channel(channel_id)
await channel.send('\n'.join(activity))
print ('scheduled message sent')
@msg1.before_loop
async def before_msg1():
for x in range(60*60*24):
if dt.datetime.now().hour == 10:
print ('its time')
return
await asyncio.sleep(1)
bot.run(DISCORD_TOKEN)