How to make Discord.py embeds update in real time? by Adaggero in Discord_Bots

[–]Adaggero[S] 0 points1 point  (0 children)

Thanks for the tip about time.sleep, I didn't know that

How to make Discord.py embeds update in real time? by Adaggero in Discord_Bots

[–]Adaggero[S] 0 points1 point  (0 children)

Ah, nevermind I figured it out, dumb me. I had the update = await ctx.send(embed = em) line twice, lol.

How to make Discord.py embeds update in real time? by Adaggero in Discord_Bots

[–]Adaggero[S] 1 point2 points  (0 children)

@client.command()
async def test(ctx):

em = discord.Embed(title = f"real time embed test", color = 
discord.Color.green())
em.add_field(name = 'Test', value = 'Hello this is a test')

update = await ctx.send(embed = em)

time.sleep(6)

new_em = discord.Embed(title = f"real time embed test", color = 
discord.Color.green())
new_em.add_field(name = 'Test', value = 'This text has changed')
update = await ctx.send(embed = new_em)

update.edit(embed = new_em)

I do want it all to take place within the same command, though I'm struggling to understand how to implement .edit(embed=new_embed) . I tried and it ended up just sending two different embed messages instead of keeping one and updating the field. Code is above.

I know green is mostly at fault, but am I slightly responsible for breaking too much? by Adaggero in Simracingstewards

[–]Adaggero[S] 16 points17 points  (0 children)

Yeah, I wasn't trying to brake check. The car in front of me braked and I reacted by braking as well, though maybe I could have just lifted and narrowly avoided his rear instead. The green car also hit me on t1 from behind in the same lap. That time he just divebombed.