ErikBoesen / AntiSpamBot

GroupMe bot for fighting spam in groups.
MIT License
2 stars 6 forks source link

Bot tries to remove admins #2

Closed Adamruns closed 6 months ago

Adamruns commented 6 months ago

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.

ErikBoesen commented 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.

Adamruns commented 6 months ago

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. IMG_2894

ErikBoesen commented 6 months ago

You're right, I forgot that you can see admin status under memberships.