A Discord bot built on JDA (Java Discord API) with optional MySQL integration, logging, and modular listeners.
- Discord bot powered by JDA 5.x with modular listeners and handlers
- Configuration via
.envwith optional JDBC-backed persistence - Logging to
Log.txtfor runtime diagnostics - MySQL (JDBC) support
- Welcome messages with generated welcome images
- Support ticket system using private threads and staff notifications
- Poll creation with interactive buttons and automatic poll closing
- Reaction-role assignments for rules acknowledgements
- User reporting via modal forms routed to staff channels
- Music playback from SoundCloud with queue controls and track info commands
- Role-based member lookup via slash commands
- Global announcement embed creation and updates
- Java 17
- Maven 3.8+
- Discord bot token
- Optional: MySQL database
- Clone the repository.
- Create a
.envfile in the project root. - Build the jar.
TOKEN=your-discord-bot-token
ACTIVITY=playing with JDA
JDBCLOGIN=jdbc:mysql://localhost:3306/discordbot
JDBCUSERNAME=your_db_user
JDBCPASSWORD=your_db_password
GUILDID=your_guild_id
BOTCHANNEL=your_bot_channel_id
WELCOMECHANNEL=your_welcome_channel_id
LOGCHANNEL=your_log_channel_id
REPORTCHANNEL=your_report_channel_id
VOTECHANNEL=your_vote_channel_id
SUPPORTCHANNEL=your_support_channel_id
STAFFCHANNEL=your_staff_channel_id
BOTROLEID=your_bot_role_id
STAFFROLEID=your_staff_role_id
NEWSCHANNEL=your_news_channel_id
SUPPORT_MENTION_PRIMARY=<@123456789012345678>
SUPPORT_MENTION_SECONDARY=<@123456789012345678>
POLL_TITLE_URL=https://store.steampowered.com/app/1482480/Fall_in_Duty/
POLL_THUMBNAIL_URL=https://media.discordapp.net/attachments/716352356845092905/1099323354852364288/UE4.pngNote: The bot exits at startup if the JDBC credentials are invalid.
A starter schema is provided in DB.sql. Import it before running the bot:
mysql -u your_db_user -p discordbot < DB.sqlmvn clean packagemvn clean compile assembly:singlejava -jar target/DiscordBot-1.0.0-jar-with-dependencies.jar- Log file:
Log.txt
This project is licensed under the PolyForm Noncommercial License 1.0.0. See LICENSE.
Pull requests are welcome. Please document changes clearly.
Do not commit secrets (tokens, database passwords) to the repository.