Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
29a419a560 | ||
|
|
eddd857a20 | ||
|
|
7c74bd153e | ||
| 0ce59fead3 | |||
| 74263537d5 |
14
CHANGELOG.md
14
CHANGELOG.md
@@ -1,3 +1,17 @@
|
|||||||
|
# [1.3.0](https://git.tools.ldpt.fr/lucasdpt/spring-jda-starter/compare/1.2.0...1.3.0) (2025-12-17)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* add guild Id ([eddd857](https://git.tools.ldpt.fr/lucasdpt/spring-jda-starter/commit/eddd857a205a2f17e7581bd6a278dc354191777b))
|
||||||
|
|
||||||
|
# [1.2.0](https://git.tools.ldpt.fr/lucasdpt/spring-jda-starter/compare/1.1.0...1.2.0) (2025-12-16)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* bump ([0ce59fe](https://git.tools.ldpt.fr/lucasdpt/spring-jda-starter/commit/0ce59fead3fe53d13efee8922cf726cfc4bed853))
|
||||||
|
|
||||||
# [1.1.0](https://git.tools.ldpt.fr/lucasdpt/spring-jda-starter/compare/1.0.2...1.1.0) (2025-12-15)
|
# [1.1.0](https://git.tools.ldpt.fr/lucasdpt/spring-jda-starter/compare/1.0.2...1.1.0) (2025-12-15)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
5
pom.xml
5
pom.xml
@@ -5,11 +5,11 @@
|
|||||||
|
|
||||||
<groupId>fr.lucasdupont</groupId>
|
<groupId>fr.lucasdupont</groupId>
|
||||||
<artifactId>spring-jda-starter</artifactId>
|
<artifactId>spring-jda-starter</artifactId>
|
||||||
<version>1.1.0</version>
|
<version>1.3.0</version>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<java.version>21</java.version>
|
<java.version>21</java.version>
|
||||||
<spring.boot.version>3.5.7</spring.boot.version>
|
<spring.boot.version>4.0.0</spring.boot.version>
|
||||||
<kotlin.version>2.2.0</kotlin.version>
|
<kotlin.version>2.2.0</kotlin.version>
|
||||||
<jda.version>6.1.1</jda.version>
|
<jda.version>6.1.1</jda.version>
|
||||||
</properties>
|
</properties>
|
||||||
@@ -71,6 +71,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
|
<version>${spring.boot.version}</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<skip>true</skip>
|
<skip>true</skip>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|||||||
@@ -10,4 +10,5 @@ class JdaConfiguration {
|
|||||||
var onlineStatus: OnlineStatus = OnlineStatus.ONLINE
|
var onlineStatus: OnlineStatus = OnlineStatus.ONLINE
|
||||||
var cacheFlags: Set<CacheFlag> = emptySet()
|
var cacheFlags: Set<CacheFlag> = emptySet()
|
||||||
var activity: String? = null
|
var activity: String? = null
|
||||||
|
var guildId: String? = null
|
||||||
}
|
}
|
||||||
@@ -55,9 +55,16 @@ class JdaService(
|
|||||||
|
|
||||||
val commandDataList = contextCommands.map { it.toCommandData() }
|
val commandDataList = contextCommands.map { it.toCommandData() }
|
||||||
|
|
||||||
jda.updateCommands()
|
if (jdaConfiguration.guildId != null) {
|
||||||
.addCommands(commandDataList)
|
jda.getGuildById(jdaConfiguration.guildId!!)
|
||||||
.queue()
|
?.updateCommands()
|
||||||
|
?.addCommands(commandDataList)
|
||||||
|
?.queue()
|
||||||
|
} else {
|
||||||
|
jda.updateCommands()
|
||||||
|
.addCommands(commandDataList)
|
||||||
|
.queue()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventListener(SlashCommandInteractionEvent::class)
|
@EventListener(SlashCommandInteractionEvent::class)
|
||||||
|
|||||||
Reference in New Issue
Block a user