ottobot-v3/src/main/kotlin/nl/voidcorp/ottobot/commands/debug/DebugCommand.kt

16 lines
577 B
Kotlin

package nl.voidcorp.ottobot.commands.debug
import nl.voidcorp.ottobot.command.*
object DebugCommand :
Command("debug", commandLevel = CommandLevel.MAINTAINER, group = CommandGroup.VeRY_hIdden_CaTegoRY_LoL) {
private val list: Set<Command> = allCommands
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
}
}