A general purpose Discord Bot for the Monkey Gamers community written in C#
Explore the available commands »
Join Chat
·
Report Bug
·
Request Feature
- About MonkeyBot
- Getting Started
- Usage
- Troubleshooting
- Roadmap
- Contributing
- License
- Contact
- Acknowledgements
MonkeyBot is a general purpose Discord Bot that was created for the needs of the Monkey Gamers community. Its main functions are:
- Welcoming new users
- Get updates from various feeds (ATOM/RSS) including our own Forums and Website
- (Self) role assignments
- Scheduled announcements
- Game server tracking
- Silly stuff like Trivia, Chuck Norris jokes, Benzen Facts, xkcd...
- .NET Core
- Discord.Net
- CodeHollow.FeedReader
- Fluent Command Line Parser
- FluentScheduler
- Html Agility Pack
- Humanizer
- Microsoft.EntityFrameworkCore
- NCrontab
- NLog
- SQLite
- SteamQueryNet
- Latest .NET core SDK for your platform (3.0 or later) - you can download it here
- A registered Discord application with a bot access token. If you don't have one, you can create one with your existing Discord account here. There you have to add a Bot and need to copy both Bot Token and Client ID. To then add the bot to your Discord server go to
https://discordapp.com/oauth2/authorize?scope=bot&permissions=0&client_id=[ID]
, replacing [ID] with the Client ID of your bot (not the token) - Optional: A cloudinary API key (only required for the Minecraft server status image). You can register one here
- Optional: An IDE of your choice (Visual Studio 2019 recommended)
-
Clone the repo
git clone https://github.com/MarkusKgit/MonkeyBot.git
or download it from GitHub and unzip it
-
Build
cd MonkeyBot dotnet build
or open the solution in Visual Studio and build
-
Run
dotnet run
On the first run of the Bot the configuration file will automatically be created by prompts on the command line. For a first test you only need to provide the Bot access token. The configuration will be stored in
/config/configuration.json
. Look at exampleconfig.json to see the structure of the config file if you wish to create it manually. -
Publish
To permanently run the bot you should publish it first:
dotnet publish -c Release --output published
Then you can create a daemon/service that automatically runs
dotnet published/MonkeyBot.dll
Here is an example for a system.d config file (tested on Ubuntu server):# /etc/systemd/system/MonkeyBot.service # To enable: sudo systemctl enable MonkeyBot.service # To start: sudo systemctl start MonkeyBot.service [Unit] Description=MonkeyBot service [Service] WorkingDirectory=/home/markus/MonkeyBot/published ExecStart=/usr/bin/dotnet /home/markus/MonkeyBot/published/MonkeyBot.dll Restart=on-failure RestartSec=10 SyslogIdentifier=monkeybot-service [Install] WantedBy=multi-user.target
Updates to new versions are then as easy as:
sudo systemctl stop MonkeyBot.service cd /home/markus/MonkeyBot git pull dotnet publish -c Release --output published sudo systemctl start MonkeyBot.service
Once the bot is running and connected it will respond to commands. Try !help to get you started.
Logfiles are stored in Logs
directory and fatal errors will also appear in the command line output. The SQLite database is located in the Data
directory.
If you have any questions or found a bug you can open an issue or get in touch on Discord
See the open issues for a list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated. Have a look at our Contributing guidelines for more info.
tl;dr:
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.
Project Link: https://github.com/MarkusKgit/MonkeyBot
Discord: https://discord.gg/u43XvME
For a full list of commands see Commands