Closed Adamruns closed 6 months ago
In principle I agree with this, but I think it would be much more straightforward to just try a kick, and if it fails then send the error message. It would be a lot more complicated (and use more lambda runtime) to preemptively check who is an admin.
What if we just check on the message we are currently looking at? Printing an error message would also start to clog the groupme. What I noticed in some of the groups that I implemented this on is something like this . Basically I convinced these guys to add it to the group and they were messing with it. The bot deletes the message and says that it kicked them but in reality it wasn't able to due to permission issues.
You're right, I forgot that you can see admin status under memberships.
If an admin of a group tries to send a blocked phrase the bot tries (and fails) to remove the user from the group. It still prints the message saying that it kicked them after deleting the message. To solve this we should only attempt to kick people that are not admin.