This twitch bot records messages in an sql database as markov chains
It can then generate random word-sentences by mixing up previously recorded chat messages
!random
Mike potatos chips
!random
Player 1 has won 4 matches this set.
!random
ez dodge
!random
7 barracks is too good
- Python 3.7
- Mysql
-
Clone the repository
-
Install python dependencies
pip3 install -r requirements.txt
-
Create log and pid dirrectories
sudo mkdir /var/log/markitch
sudo chown YOUR_USER /var/log/markitch
mkdir -p ~/.run/markitch
-
Create a mysql database
-
Rename the config file
mv config.py.example config.py
-
Edit
config.py
with your configurationtwitch_oauth
is a token that can be generated by the bot account here please note that only the part afteroauth:
is requiredtwitch_channel_bots
is a list of users from which to NOT record messages from -
Run
python3 setup.py
to create the mysql table
python3 markitch_daemon.py start
to start the daemon
python3 markitch_daemon.py stop
to stop the daemon
If you suspect something is not working you can check the logs in /var/log/markitch/
You can generate a random senetence in the terminal with python3 gen.py
or directly in the twitch chat with !random