Sanara is a Discord bot made in C#.
Her goal is to provide various functionalities, you can check them here.
I spent a lot of times working on her and I hope that her source code will be able to help some people as the source code of some others bots did for me.
External libraries used
Please make note that the bot also collect and save some datas:
Datas saved for stats:
All the following datas are saved for stats purposes are are available here: https://zirk.eu/sanara.html#stats
- Server population and user type (user or bot)
- Module usage by server
- Game usage
Datas saved for guild preference:
All the following datas are saved in a database, they are available by doing the 'GDPR' command:
- Guild id
- Guild preferences (prefix and language used)
- Datas about games (best score and id of users that contributed to that score)
- Modules enabled/disabled
Datas saved in case of error:
All the following datas are saved when an exception occured (when the bot fail a command in an unexpected way) and are only visible by the owner, they are used for debug purpose and are automatically deleted after 30 days:
- Command launched along with a full stacktrace (exact point in the code where the error occured)
- Complete username of the user that launched the command along with the server/chanel name where it was launched
- Date when the error occured
I want you to send me/delete every datas you have about me
About an user
Contact Zirk#0001 on Discord
About a guild
Contact Zirk#0001 on Discord with the guild you want information about, along with the proofs that you are indeed it owner
How to use Sanara by cloning the repository
- First clone the repository like that: git clone --recurse-submodules https://github.com/Xwilarg/Sanara.git , that will allow you to also clone the translation submodule.
- Then open SanaraV2.sln with Visual Studio
- You'll need to create a 'Keys' folder near your executable (default location: bin/Debug/)
- You then need to create at least a 'token.dat' file inside the Keys folder. It contains the token of your bot.
- The last step is to go inside 'Sentences.cs' and change the ownerId value by your Discord id.
- Then download RethinkDb and launch it
- You can also create the following files in the 'Keys' folder:
- Sanara-7430da57d6af.json (contain your json file to access to the Google Translate API)
- URLShortenerAPIKey.dat (contain your key for the goo.gl API), youtubeAPIKey.dat (contain your key for the YouTube API)
- ranven.dat (contain your url to use Sentry)
- visionAPI.json (contain your json for the Google Vision API)
- To use radio you will also need to add opus.dll, libsodium.dll, ffmpeg.exe and youtube-dl.exe near Sanara executable, you can download them here and here.
- To use games, you will also need to add files to the 'Saves' folder (downloadable here):
- AnimeTags.dat for the anime guess game
- BooruTriviaTags.dat for the booru guess game
- shiritoriWords.dat for the shiritori game