Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.
John Iannandrea edited this page Mar 12, 2016 · 10 revisions

Configuring Pybot

How to configure pybot through the command line.

You can now modify all these settings through the web interface at: 127.0.0.1:8888

User details

Pybot needs access to a twitch user account to be able to send messages, kick, ban, and do other things. It does it by using the accounts oauth. You can get your accounts oauth here. Take that accounts name and oauth number and set them up like this:

  • pybot --config bot.name selectedUsername
  • pybot --config bot.auth oauth:botauthentication

Now set the channel you want to moderate:

  • pybot --config twitch.channel channeltomoderate

Compatibility

Add anything to the beginning of commands so they dont clash with other bots commands using: (!quote == !anythingquote)

  • pybot --config compatibility.append_to_commands anything

Filters

You can now toggle filters via the web interface. All filters in the src/filters are also visible on the website

By default pybot has all of its filter enabled, you can see them in the filters/ folder in the main directory. You can set what ones are enabled by changing filters.activefilters. by default its ["length", "profanity", "repetition", "uppercase", "websites"]. As you can see the names of the filters correspond to the scripts in the filters/ folder but without the .py in them.

I don't actually know if you can quickly change this value using --config yet so you can just open the pybot.conf file directly and set those. This is what it looks like in the config:

[filters]

activefilters = ["length", "profanity", "repetition", "uppercase", "websites"]

Example of it changed:

[filters]

activefilters = ["length", "websites"]

You can also add your own filters if you make a script and place it into the filters/ folder. Just add the name of it in the config and it pybot will try to use it. More detail here

Features

Features in pybot can be enabled or disabled at startup. To disable/enable them simply switch their status from either true or false.

  • pybot --config features.quotes false
  • pybot --config features.raffle true
  • pybot --config features.linkgrabber false

Points

The point system is a feature but it has more options so I gave it its own section in the config. You can set how many points get added to each user and the interval. The system is currently just based on how long they're in the chat. Here is an example:

  • pybot --config points.enabled true
  • pybot --config points.points_to_append 5
  • pybot --config points.interval_in_minutes 15

Web interface settings

Pybot has a web interface that you can access to control the bot. This feature is enabled by default, you can modify its settings like:

  • pybot --config web.enabled true
  • pybot --config web.port 8888