Home › Discord Bots › Discord4J
What is Discord4J? the reactive Discord bot library for Java and Kotlin
Discord4J is a fast, powerful, unopinionated, reactive library for building Discord bots in Java, Kotlin and other JVM languages, using the official Discord Bot API.
Discord4J in one paragraph
Discord4J (github.com/Discord4J/Discord4J) is a library for developers who build Discord bots in Java, Kotlin or another JVM language. It follows the reactive-streams protocol, handles rate limiting and reconnection automatically, and is published on Maven Central. The project appeared on GitHub in November 2015, passed 1,900 stars by early December 2026, and is released under the LGPL-3.0. Version 3.3.x is current, targeting Discord’s Gateway/API v10.
Discord4J has powered some very large bots. Groovy, the second-largest bot on Discord, served music to over 4 million servers before its shutdown in August 2021. ZeroTwo, an anime multi-purpose bot, is used in over 1 million servers, and DisCal, which puts Google Calendar into Discord, serves over 21,000 servers.
What Discord4J actually does
Discord4J is a library, not a ready-made bot. It gives developers the pieces to build any bot, big or small.
1. Reactive by design
Discord4J uses Project Reactor as the foundation of its asynchronous framework, following the reactive-streams protocol so bots run smoothly and efficiently regardless of size. Reactor’s API lets you reduce resource use and increase performance, and it integrates with frameworks such as Spring and Micronaut.
2. Official-spec behaviour, built in
Automatic rate limiting, automatic reconnection strategies and consistent naming conventions are among the features Discord4J offers to keep your bot running to Discord’s specifications, with as few surprises as possible when you interact with the library.
3. Modular, down to the metal
Discord4J breaks itself into modules so advanced users can interact with the API at lower levels, build minimal and fast runtimes, or add their own abstractions. For large-scale bots it offers tools such as custom distribution frameworks and off-heap caching.
4. Quick to start, well documented
Add com.discord4j:discord4j-core:3.3.0 from Maven Central with Gradle, Maven or SBT, and a !ping bot that answers Pong! is a few lines of code. Documentation is at docs.discord4j.com, Javadocs on javadoc.io, and example projects in a dedicated repository.
Download and setup
Add the dependency from Maven Central — Gradle (implementation 'com.discord4j:discord4j-core:3.3.0'), Gradle Kotlin DSL, Maven or SBT — then write your bot against the v3.3 API. The README’s quick example creates a client from your bot token, logs in, and answers !ping with Pong!. Remember to enable the Message Content intent in the Discord developer portal if your bot reads message text.
What it costs
Discord4J itself is free — LGPL-3.0, no subscription, no fee. It is a library, so the only costs are the ones every bot has: hosting for your bot process, and your own development time. Sponsors fund the project’s hosting and community work, voluntarily.
Who Discord4J is for
Java and Kotlin developers
You build in Java, Kotlin or another JVM language and want a Discord library that speaks your stack, not a second language.
Developers building large bots
Custom distribution frameworks, off-heap caching and Reactor integration are built for bots that serve thousands of servers.
Spring and Micronaut shops
Discord4J’s Reactor foundation integrates with the frameworks your team already runs.
Developers who want the spec handled
Rate limiting and reconnection are automatic, so you write bot logic instead of protocol plumbing.
Discord4J at a glance
- Project: Discord4J/Discord4J — “a fast, powerful, unopinionated, reactive library to enable quick and easy development of Discord bots”
- Licence: LGPL-3.0 — free and open source
- Popularity: over 1,900 GitHub stars by early December 2026 (created November 2015)
- Language: Java (Kotlin and other JVM languages supported)
- Install: Maven Central — Gradle, Maven or SBT; current version 3.3.x, Gateway/API v10
- Docs: docs.discord4j.com; site discord4j.com
- Proven at scale: Groovy (4M+ servers), ZeroTwo (1M+ servers), DisCal (21k+ servers)
Honest limits
One honest limit first: Discord4J is a library, not a bot. It will not moderate your server or play music until you write the code — if you want a working bot without coding, a ready-made bot like Red-DiscordBot is the better choice. Second, the reactive model has a learning curve: if you have never used Project Reactor, expect to learn it before the library feels natural. Third, older versions are unsupported — 3.2.x is unsupported and 3.1.x is maintenance-only, so build on 3.3.x. Our Discord bot service builds Discord bots on libraries like Discord4J for teams that want a custom bot without writing it themselves.
Want a game without doing the setup?
Discord4J is the kind of library our Discord bot service builds custom bots on when a server needs something no off-the-shelf bot does: we write the bot in Java or Kotlin on Discord4J, test it, and host it for you. Simple bots from £149, full custom builds from £349, managed bots with hosting from £599. You bring the idea; we write the code.
Have a game idea?
Tell us the idea — a sentence is enough. We will tell you what it takes and what it costs, honestly.