How can I send a later on changing message?
I tried something like this:
message = bot.get_channel(id).send("deleting in 5s")
time.sleep(5)
message.delete()
But it gives me this error:
AttributeError: 'coroutine' object has no attribute 'edit'
How can I make this work?
send
, delete
and edit
are async functions, remember to use await when calling them.
channel = bot.get_channel(id)
message = await channel.send("deleting in 5s")
time.sleep(5)
await message.delete()