This script will go through all members of a given group and remove some of them, if they match certain criteria.
This script uses Telethon as a client. Replace config.api_id
and config.api_hash
with your
own. You can get them here.
Before letting it run in your group, make sure to set config.testing
to True
, then inspect the output while running.
If everything works as intended, set it back to False
. This prevents you from kicking possibly too many people.
There's two main criteria after which a user might get kicked: being a scammer or being overly inactive. You can
optionally set config.strict
to True
.
Improvements to the code are welcome :)