Markov Chain Discord Bot.
- data set based on your server messages
- has a 10% chance of sending the generated text on any message
/generate
slash command generates text
- Clone repo
- Build server
cd markov-chain-api cargo build --release
- Copy the server into the bot path
- Install modules for the discord bot
cd discord-bot python3 -m pip install requirements.txt
- Run server
default<host>:<port>
is127.0.0.1:8080
markov-chain-api.<ext> <host>:<port>
- Configure discord bot
editconfig.py
in your favorite text editor or IDE# config.py TOKEN = "token" # Your discord bot token URL = "https://<host>:<port?>" # Server url SERVER_ID = 755679434585 # Your discord server id CHANNEL_BLACK_LIST = [625237354678, 154572567, 9564568478] # Channel IDs from wich data will not be collected
- ONLY ON FIRST RUN
python3 discord-fetch-history.py
- Run bot
python3 discord-bot.py
- Dataset have no weights, so it grow fast af (weights implemented by repeatedly adding a word to the next word list, so random have more chance to choose a more relevant word)
- Words don't convert to the initial form