]> git.lizzy.rs Git - furrybot.git/commitdiff
Minor Fixes: define prepositions properly, fix error message when proposing to marrie...
authorElias Fleckenstein <eliasfleckenstein@web.de>
Sun, 12 Sep 2021 19:02:23 +0000 (21:02 +0200)
committerElias Fleckenstein <eliasfleckenstein@web.de>
Sun, 12 Sep 2021 19:02:23 +0000 (21:02 +0200)
bot.lua

diff --git a/bot.lua b/bot.lua
index d9d4b47835a1c42f6e43f955c7387f77c72e2088..d4e9826b2f1e8160591f8ff36990b4f9ed62d385 100644 (file)
--- a/bot.lua
+++ b/bot.lua
@@ -43,7 +43,7 @@ function furrybot.parse_message(player, message, discord)
                local func = furrybot.commands[cmd]
                if func then
                        if furrybot.unsafe_commands[cmd] and discord then
-                               furrybot.error_message(player, "Sorry, you cannot run this command from discord", cmd)
+                               furrybot.error_message(player, "Sorry, you cannot run this command from discord", cmd)
                        else
                                func(player, unpack(args))
                        end
@@ -267,7 +267,7 @@ furrybot.commands.marry = furrybot.request_command(function(name, target)
                furrybot.error_message(name, "You are already married to", storage:get_string(name .. ".partner"))
                return false
        elseif storage:contains(target .. ".partner", name) then
-               furrybot.error_message(name, target .. " is already married to", storage:get_string(name .. ".partner"))
+               furrybot.error_message(name, target .. " is already married to", storage:get_string(target .. ".partner"))
                return false
        else
                furrybot.ping_message(target, name .. " proposes to you. Type !accept to accept or !deny to deny.", furrybot.colors.system)
@@ -409,7 +409,7 @@ function furrybot.commands.define(name, word)
        if word then
                furrybot.json_http_request("https://api.dictionaryapi.dev/api/v1/entries/en_US/" .. word:gsub("computer", "person"), name, function(data)
                        local meaning = data.meaning
-                       local selected = meaning.abbreviation or meaning["cardinal number"] or meaning.exclamation or meaning.noun or meaning.verb or meaning.adjective or meaning["transitive verb"] or meaning.adverb or meaning["relative adverb"]
+                       local selected = meaning.abbreviation or meaning["cardinal number"] or meaning.exclamation or meaning.noun or meaning.verb or meaning.adjective or meaning["transitive verb"] or meaning.adverb or meaning["relative adverb"] or meaning.preposition
                        if not selected then
                                print(dump(meaning))
                                furrybot.error_message(name, "Error in parsing response")