19 lines
763 B
Kotlin
19 lines
763 B
Kotlin
package nl.voidcorp.discord.commands
|
|
|
|
import nl.voidcorp.discord.command.Command
|
|
import nl.voidcorp.discord.command.CommandGroup
|
|
import nl.voidcorp.discord.command.CommandMessage
|
|
import nl.voidcorp.discord.command.CommandResult
|
|
import org.springframework.context.annotation.Lazy
|
|
import org.springframework.stereotype.Service
|
|
|
|
@Service
|
|
class DebugCommand(@Lazy private val list: List<Command>) : Command("debug", commandLevel = CommandGroup.MAINTAINER) {
|
|
override fun handle(event: CommandMessage): CommandResult {
|
|
event.reply("DebugInfo")
|
|
event.reply("Commands found: ${list.size}")
|
|
event.reply(list.joinToString(prefix = "`debug`, ") { "`${it.name}`" })
|
|
event.reply("EndDebugInfo")
|
|
return CommandResult.SUCCESS
|
|
}
|
|
} |