diff options
Diffstat (limited to 'src/jsMain/kotlin/moe/nea89/website/Command.kt')
-rw-r--r-- | src/jsMain/kotlin/moe/nea89/website/Command.kt | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/jsMain/kotlin/moe/nea89/website/Command.kt b/src/jsMain/kotlin/moe/nea89/website/Command.kt new file mode 100644 index 0000000..b8e4675 --- /dev/null +++ b/src/jsMain/kotlin/moe/nea89/website/Command.kt @@ -0,0 +1,11 @@ +package moe.nea89.website + +data class Command( + val name: String, + val aliases: Set<String>, + val runner: suspend ShellExecutionContext.() -> Unit, +) + + +fun command(name: String, vararg aliases: String, block: suspend ShellExecutionContext. () -> Unit) = + Command(name, aliases.toSet(), block)
\ No newline at end of file |