Skip to content

A JVM-based REST/WS wrapper for the official Discord Bot API, written in Java

License

Notifications You must be signed in to change notification settings

quarkiverse/quarkus-discord4j

Repository files navigation

Quarkus Discord4J

All Contributors

Version

Quarkus Discord4J is an experimental Quarkus extension which allows you to develop a WebSocket-based (Gateway) Discord bot using the Discord4J library with minimal boilerplate.

Your bot code will look like this:

class MyDiscordBot {
    Mono<Void> onMessageCreate(@GatewayEvent MessageCreateEvent event) {
        return event.getMessage().addReaction(ReactionEmoji.of("🤖"));
    }
}

The code above listens to the MESSAGE_CREATE Gateway event and adds a reaction of 🤖 to every received message.

With the additional commands extension, you can also automatically register and listen for application commands.

Because it's a Quarkus extension, all the standard Quarkus goodies apply:

  • Quarkus live reload to detect user code changes and restart your bot automatically (and delay incoming events until after your bot restarts to increase developer joy!)
  • Native executable generation via GraalVM or Mandrel
  • Optional automatic metrics collection
  • And more!

Inspired by the Quarkus GitHub App extension.

Documentation

Please refer to the extension documentation to learn how to get started and more.

Examples

Does your Discord bot use this extension? Please open a PR and add it here!

Contributors ✨

Thanks goes to these wonderful people (emoji key):

cameronprater
cameronprater

💻 🚧
Guillaume Smet
Guillaume Smet

💻
Julien Ponge
Julien Ponge

💻

This project follows the all-contributors specification. Contributions of any kind welcome!

About

A JVM-based REST/WS wrapper for the official Discord Bot API, written in Java

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages