Sanara is made with various services, you are free to contribute to any of them by opening an issue or doing a pull request:
- Sanara: The bot that you interact with on Discord
- Sanara-Website: This website
- Bots-db: Backend that Sanara use to send her stats to this website
- ProgramManager: Backend that automatically restart the bot when it is down
Data collected by Sanara▼
Datas collected for stats
All these datas are available in the stats page.
- Commands and modules used
- Unexpected errors encountered by the bot
- Scores on the game module
Datas collected for guild preference
All these datas are available by doing the 'GDPR' command.
- Guild configuration (anonymize setting, module availability, bot prefix, subscriptions, settings specific to some modules)
- Game scores and ids of the contributors
Datas collected in case of error
All these datas are saved when an exception occured (when a command fail in an unexpecting way) and are automatically deleted after 30 days.
These are private and only the bot owner can access them.
- Name of the command launched, along with the user that launched it, the guild/channel where he is and the message sent
- Crash stacktrace (exact point where the exception occured in the code)
- Date when the error occured
- Error message
Datas collected by this website
This website use Google Analytics, you can see all data they collect on their tracking code overview page.
Request / Delete all the data about me▼
Send me a mail or contact me on Discord (Zirk#0001).
Using Sanara by cloning the repository▼
At first you'll need to clone Sanara repository recursively:
git clone --recurse-submodules https://github.com/Xwilarg/Sanara.git
Then install rethinkdb and start it.
If you want to use audio related commands, you'll also need opus, libsodium, ffmpeg and youtube-dl.
The next step is to create the credendial file, go in SanaraV3/bin/Debug/Keys and create a file named "Credentials.json", this file will contains all your keys in the JSON format.
There is one mandatory value:
All the others fields are optional, you can see the full list in the Credentials file.
Once it's done you can launch the project (either by launching Visual Studio or by using the dotnet command)
If you want to keep the bot alive, you can use the services in the Services/ folder with systemctl (start Sanara.service)
Improving Sanara▼
To begin with, you'll need to fork the repository and to setup the bot as described in the previous step.
Please make note that the bot is made using Discord.Net in C#, before starting you'll need some knowledge with them.
You can then access Sanara's code inside the SanaraV3/ folder:
- Attribute: Preconditional check used for commands
- CustomClass: Custom classes used in parameter of the commands
- Database: Contains all functions that interract with the database
- Discord-Utils: Submodule containing various utility functions
- Exception: Custom exceptions used within Sanara
- Game: Sanara's game module
- Help: Informations used for the "help" command
- LanguageResource: JSON files used to convert Romaji from/to Hiragana/Katakana
- Module: All commands of Sanara split into various modules
- StatUpload: Functions that send data to Sanara's stat page
- Subscription: Functions related to the subscription commands
- TypeReader: Discord.NET parsers for some command parameters
- Constants.cs: Some constants used in the whole code
- Credentials.cs: Class used to parse your Credentials.json
- ErrorData.cs: Struct used for error report
- Log.cs: Functions used to log messages into the console
- Program.cs: Entry point of the program
- StaticObjects.cs: Static class containing lot of variables used through the code