ottobot-v3/src/main/kotlin/nl/voidcorp/ottobot/commands/management/SetVerifiedCommand.kt

14 lines
591 B
Kotlin

package nl.voidcorp.ottobot.commands.management
import nl.voidcorp.ottobot.command.*
import org.jetbrains.exposed.sql.transactions.transaction
object SetVerifiedCommand : Command("verify", location = CommandSource.GUILD, commandLevel = CommandLevel.ADMIN, group = CommandGroup.ADMIN) {
override fun handle(event: CommandMessage): CommandResult {
val store = getStore(event.guild!!.idLong)
transaction { store.defaultVerified = !store.defaultVerified }
event.reply("Set defaultverified to ${store.defaultVerified}!")
return CommandResult.SUCCESS
}
}