A simple Markov Chatterbot for Discord
Maribot is based on the Markovify and Discord.py libraries. In short, it learns from the chat about how sentences are usually formed, and then every so often, randomly injects something based on what it learned. The results are random, and often, hilarious.
- Clone this repository
- Install requirements. Ensure that pipenv is available, and execute
pipenv install
- Copy
config.yml.example
toconfig.yml
- Do not remove the
test_guild_please_ignore
line. - Change config.yml defaults as you wish.
- Do not remove the
- Register a new Discord bot
- When you arrive at the bot permissions page, check the "view channels" and "send messages" permissions.
- Copy the token and place it in the
bot_token
sectionconfig.yml
- On a server you have administrator rights on, use the constructed URL from the Discord bot dashboard and invite it into the server.
Simply speak as normal. MariBot will not do very much until she has had some time to listen to conversations on your server. By default, MariBot is set to !stfu
, meaning that she will not speak unless addressed by name. It is recommended that you leave this setting alone until some time has passed (a few days, at least, less on busy servers). The more chat she sees, the better the results.
Once you feel that enough time has passed, use !wakeup
, and set the !probability
to something low, like 5. (5% is a 1/20 chance of responding.) Anything much higher is likely to annoy people in the chat :)
Use !help
for commands.
Note that no permission checking is done - this is because chatterbots like MariBot tend to be contentious (and occasionally offensive), and it is important that people are able to silence the bot when they feel annoyed by it.