ottobotv2/src/main/kotlin/nl/voidcorp/discord/commands/debug/DebugCommand.kt

17 lines
673 B
Kotlin

package nl.voidcorp.discord.commands.debug
import nl.voidcorp.discord.command.*
import org.springframework.context.annotation.Lazy
import org.springframework.stereotype.Service
@Service
class DebugCommand(@Lazy private val list: List<Command>) :
Command("debug", commandLevel = CommandLevel.MAINTAINER, group = CommandGroup.`VERY HIDDEN CATEGORY lol`) {
override fun handle(event: CommandMessage): CommandResult {
event.reply("DebugInfo")
event.reply("Commands found: ${list.size + 1}")
event.reply(list.joinToString(prefix = "`debug`, ") { "`${it.name}`" })
event.reply("EndDebugInfo")
return CommandResult.SUCCESS
}
}