2 Commits
1.3.0 ... 1.3.1

Author SHA1 Message Date
semantic-release-bot
a44d987042 chore(release): 1.3.1 [skip ci]
## [1.3.1](https://git.tools.ldpt.fr/lucasdpt/spring-jda-starter/compare/1.3.0...1.3.1) (2025-12-17)

### Bug Fixes

* CommandMapper ([67e4f97](67e4f971bc))
2025-12-17 11:03:27 +00:00
lucasdpt
67e4f971bc fix: CommandMapper
All checks were successful
Release / release (push) Successful in 1m58s
2025-12-17 12:02:58 +01:00
3 changed files with 15 additions and 8 deletions

View File

@@ -1,3 +1,10 @@
## [1.3.1](https://git.tools.ldpt.fr/lucasdpt/spring-jda-starter/compare/1.3.0...1.3.1) (2025-12-17)
### Bug Fixes
* CommandMapper ([67e4f97](https://git.tools.ldpt.fr/lucasdpt/spring-jda-starter/commit/67e4f971bc3e023cb5506ec05eef68b005145b92))
# [1.3.0](https://git.tools.ldpt.fr/lucasdpt/spring-jda-starter/compare/1.2.0...1.3.0) (2025-12-17)

View File

@@ -5,7 +5,7 @@
<groupId>fr.lucasdupont</groupId>
<artifactId>spring-jda-starter</artifactId>
<version>1.3.0</version>
<version>1.3.1</version>
<properties>
<java.version>21</java.version>

View File

@@ -4,20 +4,20 @@ import net.dv8tion.jda.api.interactions.commands.build.SubcommandGroupData
import net.dv8tion.jda.internal.interactions.CommandDataImpl
fun Command.toCommandData(): CommandDataImpl = CommandDataImpl(name, description).apply {
addOptions(options)
neededPermissions?.let { setDefaultPermissions(it) }
addOptions(this@toCommandData.options)
this@toCommandData.neededPermissions?.let { setDefaultPermissions(it) }
if (subcommands.isNotEmpty()) {
addSubcommands(subcommands.map { toSubcommandData() })
if (this@toCommandData.subcommands.isNotEmpty()) {
addSubcommands(this@toCommandData.subcommands.map { it.toSubcommandData() })
}
if (subcommandGroups.isNotEmpty()) {
if (this@toCommandData.subcommandGroups.isNotEmpty()) {
addSubcommandGroups(
subcommandGroups.map { group ->
this@toCommandData.subcommandGroups.map { group ->
SubcommandGroupData(
group.name,
group.description
).addSubcommands(group.subcommands.map { toSubcommandData() })
).addSubcommands(group.subCommands.map { it.toSubcommandData() })
})
}
}