aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/com/romangraef/jdacommander/commands/HelpCommand.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/com/romangraef/jdacommander/commands/HelpCommand.kt')
-rw-r--r--src/main/kotlin/com/romangraef/jdacommander/commands/HelpCommand.kt23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/main/kotlin/com/romangraef/jdacommander/commands/HelpCommand.kt b/src/main/kotlin/com/romangraef/jdacommander/commands/HelpCommand.kt
new file mode 100644
index 0000000..63a69fc
--- /dev/null
+++ b/src/main/kotlin/com/romangraef/jdacommander/commands/HelpCommand.kt
@@ -0,0 +1,23 @@
+package com.romangraef.jdacommander.commands
+
+import com.beust.jcommander.Parameter
+import com.romangraef.jdacommander.Command
+import com.romangraef.jdacommander.ICommand
+
+@Command("help")
+class HelpCommand : ICommand() {
+
+ @Parameter(description = "Help Topic")
+ var helpTopic: String? = null
+
+ override fun run() = responseChannel.queue {
+ it.sendMessage(
+ if (helpTopic == null) {
+ "Helping...."
+ } else {
+ "Helping on topic $helpTopic"
+ }
+ ).queue()
+ }
+
+}