]> git.lizzy.rs Git - furrybot.git/commitdiff
Add mod.conf and fix .verse command to send proper requests
authorElias Fleckenstein <eliasfleckenstein@web.de>
Wed, 10 Mar 2021 07:25:53 +0000 (08:25 +0100)
committerElias Fleckenstein <eliasfleckenstein@web.de>
Wed, 10 Mar 2021 07:25:53 +0000 (08:25 +0100)
init.lua
mod.conf [new file with mode: 0644]

index 15f6e9ee0e57a81241e3a9d2d1dc8aa1bdf068ed..3bb3b4be05af8f8f3765d42e7e4f3b9696c3233a 100644 (file)
--- a/init.lua
+++ b/init.lua
@@ -121,14 +121,12 @@ end
 
 function furrybot.commands.verse(name)
        local req = {
-               --url = "https://labs.bible.org/api/?type=json&passage=random",
-               url = "localhost",
+               url = "https://labs.bible.org/api/?type=json&passage=random",
        }
        local res = http.fetch_sync(req)
        if res.succeeded then
-               --local data = minetest.parse_json(res.data)[1]
-               --furrybot.send(data.text .. C("#00FFC3") .. "[" .. data.bookname .. " " .. data.chapter .. "," .. data.verse .. "]")
-               furrybot.send(res.data)
+               local data = minetest.parse_json(res.data)[1]
+               furrybot.send(data.text .. C("#00FFC3") .. "[" .. data.bookname .. " " .. data.chapter .. "," .. data.verse .. "]")
        else
                furrybot.ping_player_error(name, "Request failed with code", res.code)
        end
diff --git a/mod.conf b/mod.conf
new file mode 100644 (file)
index 0000000..82f7a7c
--- /dev/null
+++ b/mod.conf
@@ -0,0 +1,3 @@
+name = furrybot
+author = Fleckenstein
+description = A lewd furry dating bot for Clamity anarchy (trololololol)