Files
spring-jda-starter/src/main/kotlin/fr/lucasdupont/command/Command.kt
lucasdpt d094e9c321
Some checks failed
Release / release (push) Failing after 22s
feat: initial commit
2025-11-02 21:06:57 +01:00

31 lines
878 B
Kotlin

package fr.lucasdupont.gaytabot.command
import net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent
import net.dv8tion.jda.api.interactions.commands.DefaultMemberPermissions
import net.dv8tion.jda.api.interactions.commands.build.OptionData
import net.dv8tion.jda.api.interactions.commands.build.SubcommandData
interface Command {
val name: String
val description: String
val options: List<OptionData>
get() = emptyList()
val neededPermissions: DefaultMemberPermissions?
get() = null
val subcommands: List<Command>
get() = emptyList()
val subcommandGroups: List<SubCommandGroup>
get() = emptyList()
@Throws(Exception::class)
fun execute(event: SlashCommandInteractionEvent)
fun toSubcommandData(): SubcommandData =
SubcommandData(name, description).addOptions(options)
}