'making a discord bot read a message once edited

I am working on a bot that waits for another bot to respond. my bot sends a command to bot2, bot2 sends a message that it has received my request. After a short time bot2 will edit its message with the response. How do I make my bot wait for bot2 to edit the message before reading it. ie is there a function for on_edit or a way to do it.

Thanks



Solution 1:[1]

First of all, you can do it with time.sleep().

Secondly, in this video under this message you can test if the message changed and make a counter or boolean variable. If counter / boolean changed the bot can send the message.

https://youtu.be/XL6ABuJ0XO0

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Antal Attila