Unlike most other libraries, Javacord is 100% multithreaded. Not only simple actions like sending messages are
executed asynchronously, but also logging in, event listening, ...
Javacord is easy to use, both for beginners as well as experienced Java developers. We don't force you to learn
complex frameworks or introduce unnecessary abstraction or unintuitive concepts. Only familiar default
Java classes like CompletableFutures or Optionals
The best library is worth nothing, if you don't know how to use it. To help you getting started, there are plenty of
tutorials in our wiki.
There's a large community of other bot developers in our Discord Server.
You can ask questions there, chat with other developers and keep track about Javacord's development.
Here are some examples!
This an easy starter template. It logs the bot in and adds a listener, that answers !ping
commands with Pong!. It also prints the invite url for the bot.
Creating a text channel
The following example creates a new text channel in a server with some pre-set permissions for
the @everyone role.
Deleting the last 100 messages in a channel
This code first fetches the last 100 messages in a given channel and then deletes them.