This commit is contained in:
@@ -10,4 +10,5 @@ class JdaConfiguration {
|
||||
var onlineStatus: OnlineStatus = OnlineStatus.ONLINE
|
||||
var cacheFlags: Set<CacheFlag> = emptySet()
|
||||
var activity: String? = null
|
||||
var guildId: String? = null
|
||||
}
|
||||
@@ -55,9 +55,16 @@ class JdaService(
|
||||
|
||||
val commandDataList = contextCommands.map { it.toCommandData() }
|
||||
|
||||
jda.updateCommands()
|
||||
.addCommands(commandDataList)
|
||||
.queue()
|
||||
if (jdaConfiguration.guildId != null) {
|
||||
jda.getGuildById(jdaConfiguration.guildId!!)
|
||||
?.updateCommands()
|
||||
?.addCommands(commandDataList)
|
||||
?.queue()
|
||||
} else {
|
||||
jda.updateCommands()
|
||||
.addCommands(commandDataList)
|
||||
.queue()
|
||||
}
|
||||
}
|
||||
|
||||
@EventListener(SlashCommandInteractionEvent::class)
|
||||
|
||||
Reference in New Issue
Block a user