From 42747b049a6f432c29ab32ca4b3875dec971e1d4 Mon Sep 17 00:00:00 2001 From: Jake Mattson Date: Sun, 22 Mar 2020 23:36:15 -0500 Subject: [PATCH] Update docs/help for new command --- commands.md | 4 ++-- .../me/jakejmattson/embedbot/commands/CoreCommands.kt | 6 +++--- src/main/kotlin/me/jakejmattson/embedbot/locale/Messages.kt | 1 + 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/commands.md b/commands.md index af8fd2a..1b397cf 100644 --- a/commands.md +++ b/commands.md @@ -47,8 +47,8 @@ | Delete | (Embed) | Delete the embed with this name. | | Duplicate | Embed Name, (Embed) | Create a new embed from an existing embed. | | Export | (Embed) | Export the currently loaded embed to JSON. | -| Import | Embed Name, JSON | Import a JSON String as an embed. | -| ImportFile | Embed Name, JSON | | +| Import | Embed Name, JSON String | Import a JSON String as an embed. | +| ImportFile | Embed Name, JSON File | Import a JSON File as an embed. | | Load | Embed | Load the embed with this name into memory. | | Send | (Channel), (shouldTrack) | Send the currently loaded embed. | diff --git a/src/main/kotlin/me/jakejmattson/embedbot/commands/CoreCommands.kt b/src/main/kotlin/me/jakejmattson/embedbot/commands/CoreCommands.kt index 6226a8c..eda8259 100644 --- a/src/main/kotlin/me/jakejmattson/embedbot/commands/CoreCommands.kt +++ b/src/main/kotlin/me/jakejmattson/embedbot/commands/CoreCommands.kt @@ -89,15 +89,15 @@ fun coreCommands(embedService: EmbedService) = commands { command("Import") { description = messages.descriptions.IMPORT - execute(WordArg("Embed Name"), SentenceArg("JSON")) { + execute(WordArg("Embed Name"), SentenceArg("JSON String")) { val (name, json) = it.args it.importJson(name, json, embedService) } } command("ImportFile") { - description = "" - execute(WordArg("Embed Name"), FileArg("JSON")) { + description = messages.descriptions.IMPORT_FILE + execute(WordArg("Embed Name"), FileArg("JSON File")) { val (name, jsonFile) = it.args val json = jsonFile.readText() diff --git a/src/main/kotlin/me/jakejmattson/embedbot/locale/Messages.kt b/src/main/kotlin/me/jakejmattson/embedbot/locale/Messages.kt index 8873331..5b7e7ad 100644 --- a/src/main/kotlin/me/jakejmattson/embedbot/locale/Messages.kt +++ b/src/main/kotlin/me/jakejmattson/embedbot/locale/Messages.kt @@ -31,6 +31,7 @@ class Descriptions( val DUPLICATE: String = "Create a new embed from an existing embed.", val EXPORT: String = "Export the currently loaded embed to JSON.", val IMPORT: String = "Import a JSON String as an embed.", + val IMPORT_FILE: String = "Import a JSON File as an embed.", val LOAD: String = "Load the embed with this name into memory.", val SEND: String = "Send the currently loaded embed.",