Sporks, the backchatting, learning, scriptable discord bot
This github project contains the source code for Sporks, the learning, scriptable Discord chat bot, written in C++ using the D++ library. Remember you can still find my original perl/botnix version of Sporks on IRC at irc.chatspike.net!
Project and System status
Currently only Linux is supported, but other UNIX-style platforms should build and run the bot fine. I build the bot under Debian Linux.
- cmake (version 3.13+)
- g++ (version 8+)
- D++ (master branch)
- nlohmann::json (included with D++)
- duktape (master branch)
- PCRE (whichever -dev package comes with your OS)
- MySQL Client Libraries (whichever -dev package comes with your OS)
mkdir build cmake .. make -j8
Replace the number after -j with a number suitable for your setup, usually the same as the number of cores on your machine.
You should have a database configured with the mysql schemas from the mysql-schemas directory. use mysqlimport to import this.
Edit the config-example.json file and save it as config.json. The configuration variables in the file should be self explainatory.
cd my-bot-dir ./run.sh
run.sh will restart the bot executable continually if it dies.
Command line parameters
./bot [--dev|--test] [--members]
|--dev||Run using the development token in the config file. Mutually exclusive with
|--test||Run using the live token in the config file, but squelch all outbound messages unless they originate from the test server (also defined in the config file)|
|--members||Send a GUILD_MEMBERS intent when identifying to the discord gateway|