https://github.com/brandonfl/discord-java-docker-bot
Template project to create Discord bots with Docker and Java
https://github.com/brandonfl/discord-java-docker-bot
discord discord-bot discord-java spring-boot
Last synced: 9 months ago
JSON representation
Template project to create Discord bots with Docker and Java
- Host: GitHub
- URL: https://github.com/brandonfl/discord-java-docker-bot
- Owner: brandonfl
- License: mit
- Created: 2020-08-02T12:28:35.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-06-21T04:00:09.000Z (over 3 years ago)
- Last Synced: 2025-02-02T17:28:27.125Z (11 months ago)
- Topics: discord, discord-bot, discord-java, spring-boot
- Language: Java
- Homepage:
- Size: 56.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Discord Java Docker Bot
Template project to create Discord bots with Docker and Java
How to use •
Variables •
Licence
## How to use
#### Use with docker-compose
1. Change variables in [application.properties](https://github.com/FontanyLegall-Brandon/discord-java-docker-bot/blob/master/src/main/resources/application.properties) file
2. Use command `docker-compose up`
#### Use with docker run
Command
`docker run IMAGE -e BOT_TOKEN=TOKEN ...`
with `-e` the variables
#### Use with java
1. Compile `mvn clean package`
2. Run `java -jar target/bot.war` with variables
#### Use with tomcat
1. Compile `mvn clean package` and get the war file in `target`folder
2. Config the config file of your bot `CATALINA-HOME/conf/Catalina/localhost/bot.xml` with variables
3. Deploy the war `CATALINA-HOME/webapps/bot.war`
## Variables
| Key | Description | Default |
|--|--|--|
| LOG_FILE | Location of log file | ./log/bot.log |
| BOT_TOKEN | Token of the Discord bot | None - **required** |
| DB_USERNAME | The username used for your database | bot - **required** |
| DB_PASSWORD | The password used for your database | bot - **required** |
| DB_HOST | Where your database is hosted | bot-mysql - **required** |
| DB_PORT | The port of your database | 3306 |
| DB_NAME | The name of the table | bot - **required** |
| DB_TIMEZONE | The timezone used | UTC |
## Licence
Project under [MIT](https://github.com/FontanyLegall-Brandon/discord-java-docker-bot/blob/master/LICENSE) licence