2020-05-13 16:31:14 -04:00
|
|
|
# markov-bot
|
|
|
|
|
2020-05-14 15:34:42 -04:00
|
|
|
Markov chain discord bot, sends randomly generated sentences at configurable intervals and when mentioned.
|
2020-05-13 16:31:14 -04:00
|
|
|
|
|
|
|
## Setup
|
|
|
|
|
|
|
|
Put some text into `corpus.txt`, and then run
|
|
|
|
|
|
|
|
git clone https://git.xeno.science/xenofem/markov-bot
|
|
|
|
cd markov-bot
|
|
|
|
python3 -m venv env
|
|
|
|
source env/bin/activate
|
|
|
|
pip install discord.py
|
|
|
|
python markov-prep.py
|
2020-05-14 15:34:42 -04:00
|
|
|
cp config.json.example config.json
|
|
|
|
vi config.json
|
2020-05-13 16:31:14 -04:00
|
|
|
python markov-bot.py
|
2020-05-14 15:34:42 -04:00
|
|
|
|
|
|
|
## Configuration
|
|
|
|
|
|
|
|
- `mode`: can be `reply`, to reply to occasional messages, or `timed`, to send messages unprompted to random channels at a set interval
|
|
|
|
- `reply_invfreq`: in `reply` mode, will reply to one in N messages on average
|
|
|
|
- `reply_delay_min`: minimum amount of time to wait before sending a reply
|
|
|
|
- `reply_delay_max`: maximum amount of time to wait before sending a reply
|
|
|
|
- `timed_interval_min`: in `timed` mode, minimum time between successive messages in the same guild
|
|
|
|
- `timed_interval_max`: maximum time between successive messages in the same guild
|
|
|
|
- `token`: Discord bot API token
|