https://github.com/brainboxdotcc/sporks
The source code repository for Sporks, the learning, backchatting, scriptable discord bot!
https://github.com/brainboxdotcc/sporks
bot c-plus-plus-17 chatbot cpp database discord discord-bot discord-bots dpp duktape infobot javascript linux sporks
Last synced: 12 months ago
JSON representation
The source code repository for Sporks, the learning, backchatting, scriptable discord bot!
- Host: GitHub
- URL: https://github.com/brainboxdotcc/sporks
- Owner: brainboxdotcc
- License: apache-2.0
- Created: 2019-10-25T11:16:34.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-06-12T01:24:55.000Z (almost 2 years ago)
- Last Synced: 2024-06-12T08:47:39.661Z (almost 2 years ago)
- Topics: bot, c-plus-plus-17, chatbot, cpp, database, discord, discord-bot, discord-bots, dpp, duktape, infobot, javascript, linux, sporks
- Language: C
- Homepage: https://sporks.gg/
- Size: 123 MB
- Stars: 33
- Watchers: 6
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# 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
  
[Service Status](https://status.sporks.gg)
## Listing Badges
[](https://top.gg/bot/630730262765895680)

 [](https://botsfordiscord.com/bots/630730262765895680)
## Supported Platforms
Currently only Linux is supported, but other UNIX-style platforms should build and run the bot fine. I build the bot under Debian Linux.
## Dependencies
* [cmake](https://cmake.org/) (version 3.13+)
* [g++](https://gcc.gnu.org) (version 8+)
* [D++](https://github.com/brainboxdotcc/DPP) (master branch)
* [nlohmann::json](https://github.com/nlohmann/json) (included with D++)
* [duktape](https://github.com/svaarala/duktape) (master branch)
* [PCRE](https://www.pcre.org/) (whichever -dev package comes with your OS)
* [MySQL Client Libraries](https://dev.mysql.com/downloads/c-api/) (whichever -dev package comes with your OS)
## Building
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.
## Database
You should have a database configured with the mysql schemas from the mysql-schemas directory. use mysqlimport to import this.
## Configuration
Edit the config-example.json file and save it as config.json. The configuration variables in the file should be self explainatory.
## Running
cd my-bot-dir
./run.sh
run.sh will restart the bot executable continually if it dies.
## Command line parameters
./bot [--dev|--test] [--members]
| Argument | Meaning |
| --------------- |------------------------------------------------------- |
| --dev | Run using the development token in the config file. Mutually exclusive with ``--test`` |
| --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 |