Disclaimer: this is a partially completed Rust port of a bot I wrote in Dart and is not fully featured, nor bug free.
TL;DR: this bot sits in your discord server and learns how to talk like your users
Machine learning at it's finest. This is it boys.
This is a Discord chat bot built on top of a custom Markov Chain implementation. It listens to nearly every message sent in your discord server and uses those messages as sample text to train a statistical model.
As it learns, it will be able to generate messages that resemble things that your discord server users might say. It gets better (or worse, depending on your perspective) over time.
It will occasionally respond to messages with often nonsensical, but sometimes eerily topical responses.
Why not?
The bot will learn and also respond on it's own, no need to @ it or anything like that.
By default the bot has a 1 in 20 chance of saying something every time a message is sent on the server (this will be configurable later).
The following command can also be used:
~random
generates a random messages~gen [n] [words]
where[n]
should be a number (1 to 250) and[words]
is a list of words (space separated) to start with~info
displays the number of words known by the bot
Installation (follow instructions for your operating system below, then continue to configuration instructions)
- Download the latest build
- Unzip
artifacts.zip
somewhere you want to keep it
- Go here and follow the instructions to install Rust on your system
- Download this repository and unzip it somewhere
- Open a command prompt or terminal in the folder you just unzipped
- Run the command
cargo build --release
and let it finish (it will take a few minutes) - Open up the new folder that got created:
./target/release/
- Take the binary file (
non-answer-generator.exe
on Windows, ornon-answer-generator
on Linux) and toss it in theexample
folder back in the first folder you unzipped
- Edit
config.json
and add your discord bot token to it (if you don't know where to get this, google it) - Run the binary file/executable
- Do a Google search to figure out how to invite the bot to your server
- Send some messages and enjoy the chaos
Maybe. If I have time and think it's worthwhile.
Better yet, learn rust (if you don't already know it), add the feature yourself and submit a pull request so I can add your work to the repository. Contributions are welcome and encouraged.