This project is a DiscordBot application built using few node.js modules (discord.js of course, better-sqlite3, enmap and node.js filesystem) meant to simplify dungeon profits splitting between people.
If you want to support SQ-Salary's development, you can help me out and become a Patron.
First clone the repository using:
$> git clone https://github.com/kibotrel/SQ-Salary.git
$> cd SQ-Salary
If you want to host this bot on your own you need an extra file that isn't uploaded here for security purposes : a file named config.json
in a directory called private
that stores the Bot API Token and some other stuff. You need to fill this file as follow:
{
"token": "INSERT DISCORD BOT TOKEN HERE",
"prefix": "!salary"
}
How do you get token? Fist, follow this guide to create a new Discord application, attach a bot user and add it to a server. Then on Discord Developer Portal under your brand new application settings menu, go back to the Bot sub-section and copy-paste Token to ./private/config.json
to the right field. If you know what you're doing, you can modify prefix to anything you want, it is used to interract with the bot and reduce the amount of data the bot need to deal with.
Once you cloned the repository and retrieved the API Token, the next step is to check if node.js is installed on your computer. Open up your terminal (macOS/Linux) or cammand line (Windows) and run node -v
. If the command doesn't work, you must install node. When it's done you can finally build dependencies:
$> npm install
This application must stay active if you want to keep data. If by any chance to program crashes or is terminated, everything is lost. I recommand you to launch the following command on a dedicated server or something like that.
$> node bot.js
You can see what can interract with the bot using message based commands. Each command is prefixed by a string to avoid being recognized by other applications, by default this prefix is set to !salary
and can be changed through interractions with the bot. Here is the list of available commands:
this list is retrievable by sending !salary help
by default in any channel of the server where the bot is allowed to send messages.