A discord bot for personal use. Feel free to fork and alter the code to create features that you need.
The bot is only available for communication via direct messages and replies to the bot owner's messages only. Alternatively, you can create a channel on a guild and add "allow-butler" to the channel description to allow the bot to use this channel. However, please keep in mind that the bot will still only respond to the bot owner's messages!
The easiest way to use this software is to run it using Docker. Using this approach, the setup is quite straightforward:
docker-compose.yml
file.Fill OWNER_ID
with your Discord ID. You can find this one by right-clicking on your
profile and selecting "Copy ID". Please keep in mind that "Appearance > Developer Mode" has
to be activated in order for you to see this label.
Enter your bot token in TOKEN_DISCORD
. You can create a new one here.
(Optional) If you want your errors to be sent to Sentry, you can do so by
adding your SENTRY_DSN
address as an environment variable.
An example .env
file could look like this:
OWNER_ID=<discord id>
TOKEN_DISCORD=<bot token>
SENTRY_DSN=<sentry url>
Once you are ready, simply start your containers using docker-compose up -d
.
Alternatively, you can also compile the code locally using mvn package
.
A compiled jar will be available at target/discord-butler-<version>-shaded.jar
.
Please keep in mind that you will need to set the environment variables in this case as well.
As stated initially, this is supposed to be a project for personal use only. Therefore, please don't expect very detailed documentation or advanced CI. However, this repo is open for code reviews and pull requests!
The basic Docker and Sentry setup is heavily inspired by the two project's documentations. Additionally, some configuration was taken from Biospheere's c0debaseBot, too. Please make sure to check out his work as well!
Dependencies:
Dependencies (not at runtime):