[Solved] Update embed messages every 5 minutes (discord.py) [closed]


First, you can look at that.

Then, here’s how i would do it. Adapt it to your need (also, note that this is code from the rewrite branch. If you’re using latest i really much advice you to migrate to rewrite as latest is deprecated anyway and its developpement is in standby)
:

async def my_background_task():
    await client.wait_until_ready()
    while not client.is_closed():
        message = await client.get_channel(channelId).fetch_message(messageId)
        await message.edit(embed = newEmbed)
        await asyncio.sleep(300)

bg_task = client.loop.create_task(my_background_task())

NB : Don’t forget to replace channelId by the id of the channel the message is in, messageId by the id of the message you want to edit and newEmbed by the changed embed

2

solved Update embed messages every 5 minutes (discord.py) [closed]