Skip to content

A groupMe bot that automatically kicks users who say a number of words in a set list. Intended to prevent a very specific "I'm selling tickets to..." scammer common on groupMe

Notifications You must be signed in to change notification settings

daniel-redder/clear-bot-prop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

Anti-Scam bot (UGA Aviation Club)

author: Daniel Redder


To prevent the spread of "I'm selling x tickets to (parking permits / taylor swift concerts / football games) spam bots" I've made a bot to remove these spammers.

This tool is a python tool based on python's GroupyAPI which will kick users from a group if they say too many in a small set of words. This could be redone to use some fancy NLP stuff, but it probably isn't neccesary for this task.

How to

This tool functions by executing the main.py file every 1-2 minutes. This tool will check the last k messages in active_servers's groupchat for words from the defined sus list, and if the number of these words are greater or equal to words then it will remove the user and notify admin.

It is recommended that this is done on a linux based machine, but it will work on any. The only thing that needs to change is how you are automatically calling the main.py file.

  1. install python 3.8 or 3.9
  2. open cmd and run this command pip install GroupyAPI to install the groupme API package
  3. Get a groupme API key using a admin account for the groupme server, groupmeDev
  4. Download this repository
  5. create a file in the same directory called secrets.py Which has the following contents
client = "<your API key>"
admin_init = "<The Admin's groupme client_id>"

You can get the admin's client_id using by setting the user_id_mode variable to True then running main.py like this python main.py in cmd after setting the client variable and setting admin_init="test" then simply look for the name of the admin and associated id.

  1. Now you should be good to go, just automatically call this file every minute or two. In linux you can use cron for this, in terminal type crontab -e to open your cron list. Then enter at the top of the file: * * * * * python <path to main.py> This will have it execute every minute.

About

A groupMe bot that automatically kicks users who say a number of words in a set list. Intended to prevent a very specific "I'm selling tickets to..." scammer common on groupMe

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages