There seems to be a problem with clearing leaving members from the mention list. The sequence is:
A user opts in to the bot in my group.
This user leaves the group without opting out.
I use /all.
Expected behavior: the user is absent from the bot ping message. Actual behavior: the user nickname is present in the message in plaintext.
P.S. Thanks for your work. The bot is still useful: "Notify all members" functionality apparently glitches for some users, pings by name seem to be more reliable.