#How to modify a message

1 messages · Page 1 of 1 (latest)

tulip spindle
#

Hello i would like to know how i can modify a message that is present in the chat?
I would like to create a progress bar for my bot, but i need to modify the same message until it goes to 100%
Tnx guys

livid stag
#

if the message is the bot's, then just do await message.edit(...)

#

you can get the message from await bot.rest.fetch_message(id)

charred sierra
#

Or just do bot.rest.edit_message(id, ...)

livid stag
#

forgot that existed lol

#

thx dav

dawn falcon
#

just also probably keep in mind of ratelimits

tulip spindle
#

and when i send a message with my bot like that: bot.rest.create_message(self.BOT_LOG_CHANNEL, info, attachment=file_backup) if i give to the result of the func a var, can i take the id of the created message or not?

tulip spindle
fickle jewel
#

so you can use it directly to manipulate the message

#

via the .edit() method

tulip spindle
#

gorgeous

tulip spindle
#

Or im lucky

fickle jewel
#

5 per 5 seconds iirc

#

and hikari will automatically wait if needed

tulip spindle
#

Uhh very nice, i love u