A Discord bot using Discord.NET.
- Discord Bot Token
- Visit the Discord Developers Portal
- Log in with your Discord Username and Password
- Create a new Application, Name it your desired bot name.
- Once created, click Bot in the left navigation menu.
- Click add bot, and confirm with 'Yes, do it!'
- Once the bot has been created, click 'Click to Reveal Token'
- Save this token. >> DO NOT SHARE IT <<
- Rename
sampleappsettings.config
toappsettings.config
. - Edit
appsettings.config
and add your Discord bot token to it before running. - If you are running from the source code, this should be all you need to do besides running the solution in your IDE of choice.
Note: if you're running the project via Visual Studio, do the following to ensure your appsettings.config is output to the correct directory on runtime:
- Right click
appsettings.config
and click Properties - In the properties section, set
Copy to Output Directory
toCopy Always
If you are using the a release package, do the following:
- Unzip
linux-x64.zip
- Run
chmod +x ./FischBot
in thelinux-x64
directory - Run
./FischBot
to start the bot
Contributions are welcome! Please create a new branch for the item you are working on, and submit a pull request when it is ready.
The project is divided into a few main sections:
- APIs
- Services
- Modules
Modules
are very similar to controllers if you've used an MVC framework before, and have methods for each of the bot's supported commands. Services
methods are called by modules
, and house the bot's application logic. APIs
are called by services
, and handle low-level logic like HTTP requests.
Some APIs the bot integrates with have their own Nuget packages to help integrate with the API. In these cases, instead of making a class in the Api
folder, we use the classes from the API's Nuget package directly in the Services
classes.