Skip to content

This is a script that may help you moderating a Twitch chat if the chat gets flooded with dozens of unwanted messages. For all incoming messages it determines how similar they are to phrases of your blacklist and bans them automatically using the Damerau–Levenshtein distance.

License

Notifications You must be signed in to change notification settings

sebastku/twitch-dl-ban-script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

twitch-dl-ban-script

This is a script that may help you moderating a Twitch chat if the chat gets flooded with dozens of unwanted messages. For all incoming messages it determines how similar they are to phrases of your blacklist and bans them automatically using the Damerau–Levenshtein distance.

Getting started

This script is written in Python. If not already done, please install Python 3.6 or higher in order to run the script.

Additionally you need to install the IRC library as well as jellyfish through pip:

$ pip install -r requirements.txt

Copy the file config.py.example to config.py and adjust it accordingly. You will need an OAuth access token in order to connect to the chat which can be generated by the Twitch Chat OAuth Password Generator.

Every channel you want to use this on needs a directory with the name of the channel in all lowercase characters. Within this directory you need a user whitelist whitelist.txt and a blacklist for usernames blacklist-users.txt and at least one blacklist for unwanted phrases blacklist-phrase-1.txt you want to compare to.

You can also create additional blacklists for phrases blacklist-phrase-<no.>.txt in order to group similar ones to keep better track of them.

Usage

After everything is set up just run

$ python banscript.py <channel>

Where <channel> is to be replaced with the channel you want to moderate with this script.

About

This is a script that may help you moderating a Twitch chat if the chat gets flooded with dozens of unwanted messages. For all incoming messages it determines how similar they are to phrases of your blacklist and bans them automatically using the Damerau–Levenshtein distance.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages