@@ -1,7 +1,9 @@
|
||||
package de.steamwar.commands.user
|
||||
|
||||
import com.github.ajalt.clikt.core.CliktCommand
|
||||
import com.github.ajalt.clikt.core.Context
|
||||
|
||||
class UserCommand: CliktCommand("user") {
|
||||
override fun run() = Unit
|
||||
override fun help(context: Context): String = "User related commands"
|
||||
}
|
||||
@@ -21,6 +21,8 @@ class UserInfoCommand : CliktCommand("info") {
|
||||
val userId by argument().help("Id, Name, UUID or DiscordId")
|
||||
val user by lazy { findUser(userId) ?: throw CliktError("User not found") }
|
||||
|
||||
override val printHelpOnEmptyArgs = true
|
||||
|
||||
@OptIn(ExperimentalTime::class)
|
||||
override fun run() {
|
||||
transaction {
|
||||
|
||||
@@ -16,6 +16,8 @@ import org.jetbrains.exposed.v1.jdbc.transactions.transaction
|
||||
class UserSearchCommand : CliktCommand("search") {
|
||||
val query by argument().help("Name, Id, UUID or DiscordId")
|
||||
|
||||
override val printHelpOnEmptyArgs = true
|
||||
|
||||
override fun help(context: Context): String = "Search for users"
|
||||
|
||||
override fun run() = transaction {
|
||||
|
||||
Reference in New Issue
Block a user