https://github.com/viascom/aluna-spring-boot-starter
Spring-Boot-Starter for Discord Bots based on JDA
https://github.com/viascom/aluna-spring-boot-starter
discord java jda kotlin spring-boot spring-boot-starter
Last synced: 5 months ago
JSON representation
Spring-Boot-Starter for Discord Bots based on JDA
- Host: GitHub
- URL: https://github.com/viascom/aluna-spring-boot-starter
- Owner: viascom
- License: apache-2.0
- Created: 2022-04-05T06:31:13.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2025-12-29T22:32:20.000Z (5 months ago)
- Last Synced: 2026-01-02T05:45:41.846Z (5 months ago)
- Topics: discord, java, jda, kotlin, spring-boot, spring-boot-starter
- Language: Kotlin
- Homepage:
- Size: 2.02 MB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Notice: NOTICE
Awesome Lists containing this project
README
Fast and easy way to use JDA in your Spring-Boot Project
## Version
*These are the versions of all exposed dependencies related to the aluna-spring-boot-starter version.*
| aluna-spring-boot-starter | JDA | Spring Boot | Kotlin | Emoji Library | nanoid-kotlin |
|:--------------------------|:--------------------------------------------------------------------------:|:--------------------------------------------------------------------------:|:----------------------------------------------------------------------------:|:----------------------------------------------------------------------------------------:|:--------------------------------------------------------------------------:|
| `1.4.1-SNAPSHOT` |
|
|
|
|
|
| `1.4.0` |
|
|
|
|
|
| `1.3.5` |
|
|
|
|
|
| `1.3.4` |
|
|
|
|
|
| `1.3.3` |
|
|
|
|
|
| `1.3.2` |
|
|
|
|
|
| `1.3.1` |
|
|
|
|
|
| `1.3.0` |
|
|
|
|
|
| `1.1.10` |
|
|
|
|
|
| `1.1.9` |
|
|
|
|
|
| `1.1.8` |
|
|
|
|
|
| `1.1.7` |
|
|
|
|
|
For older versions, please have a look at the [VERSION.md](VERSION.md)
## Download
Gradle:
```gradle
dependencies {
implementation 'io.viascom.discord.bot:aluna-spring-boot-starter:1.4.0'
}
```
Maven:
```xml
io.viascom.discord.bot
aluna-spring-boot-starter
1.4.0
```
## Getting Started
### Create a command
```kotlin
@Interaction
class PingCommand : DiscordCommand("ping", "Send a ping") {
override fun execute(event: SlashCommandInteractionEvent) {
event.reply("Pong\nYour locale is:${this.userLocale}").queue()
}
}
```
### React to a Button
```kotlin
@Interaction
class PingCommand : DiscordCommand("ping", "Send a ping") {
override fun execute(event: SlashCommandInteractionEvent) {
event.reply("Pong\nYour locale is:${this.userLocale}").setComponents(ActionRow.of(primaryButton("hi", "Hi")))
.queueAndRegisterInteraction(hook, this)
}
override fun onButtonInteraction(event: ButtonInteractionEvent): Boolean {
if (event.componentId == "hi") {
event.editMessage("Oh hi :)").removeActionRows().queue()
}
return true
}
}
```
## Configuration Properties
### Basic configuration example
```yaml
aluna:
discord:
token:
logging:
level:
io.viascom.discord.bot.aluna: DEBUG
io.viascom.discord.bot.aluna.event.EventPublisher: INFO #Set to DEBUG to show all published events
io.viascom.discord.bot.aluna.bot.handler.AlunaLocalizationFunction: INFO #Set to DEBUG to show translation keys for interactions
```
## Versioning
This project is developed by [Viascom](https://github.com/viascom) using
the [Semantic Versioning specification](https://semver.org). For the versions available, see
the [releases on this repository](https://github.com/viascom/aluna-spring-boot-starter/releases).
## Authors
* **Patrick Bösch** - *Initial work* - [itsmefox](https://github.com/itsmefox)
* **Nikola Stanković** - *Initial work* - [nik-sta](https://github.com/nik-sta)
See also the list of [contributors](https://github.com/viascom/aluna-spring-boot-starter/contributors) who participated
in this project. 💕
## Contributing
See [CONTRIBUTING.md](CONTRIBUTING.md) file.
If you like aluna-spring-boot-starter you can show support by starring ⭐ this repository.
# Licence
[Apache License, Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)