summaryrefslogtreecommitdiff
path: root/src/jsMain/kotlin/moe/nea89/website/Command.kt
diff options
context:
space:
mode:
authornea <romangraef@gmail.com>2022-08-26 14:56:23 +0200
committernea <romangraef@gmail.com>2022-08-26 14:56:23 +0200
commit176e37844c17eaabb5c9da0f9c23237df9c0b5a8 (patch)
tree2c7d485355eed738ce1c30b03b7424e9f4a9db48 /src/jsMain/kotlin/moe/nea89/website/Command.kt
parentb87a65229ad9c7d09fd837b95e9e03624842669b (diff)
downloadneamoe-176e37844c17eaabb5c9da0f9c23237df9c0b5a8.tar.gz
neamoe-176e37844c17eaabb5c9da0f9c23237df9c0b5a8.tar.bz2
neamoe-176e37844c17eaabb5c9da0f9c23237df9c0b5a8.zip
idk make it maveny
Diffstat (limited to 'src/jsMain/kotlin/moe/nea89/website/Command.kt')
-rw-r--r--src/jsMain/kotlin/moe/nea89/website/Command.kt11
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