anoadragon453 / nio-template

A template for creating matrix bots in python with matrix-nio
Apache License 2.0
79 stars 27 forks source link

Bot re-execute all commands after re-joining the room #41

Open AnassDriate opened 1 year ago

AnassDriate commented 1 year ago

Hello,

We created a bot for a specific use-case, which is the following :

  1. User invite the bot to a room --> the bot auto-join
  2. The user ask the bot to send an mail to someone
  3. The bot is not needed any more , the user ask the bot to leave the room
  4. The user invite the bot to the room again (the user want to send another mail to someone)
  5. The bot Auto-join -> sync all room messages -> Re-execute all commands -> leave the room X(KO)

Any idea how to avoid re-executing the commands already existing in the room ?

Regards,