aboutsummaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
authorElias Fleckenstein <eliasfleckenstein@web.de>2021-09-12 19:10:06 +0200
committerElias Fleckenstein <eliasfleckenstein@web.de>2021-09-12 19:10:06 +0200
commitedf1ee1b8c06c85cedabd998836ecc4b96809fd1 (patch)
tree957a7406b9a1153103f1f77f411b0906bd0be7b2 /init.lua
downloadamogus-edf1ee1b8c06c85cedabd998836ecc4b96809fd1.tar.xz
Initial commit
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua18
1 files changed, 18 insertions, 0 deletions
diff --git a/init.lua b/init.lua
new file mode 100644
index 0000000..a21bb9d
--- /dev/null
+++ b/init.lua
@@ -0,0 +1,18 @@
+amogus = {}
+
+local http = minetest.request_http_api()
+local env = minetest.request_insecure_environment()
+local storage = minetest.get_mod_storage()
+
+libclamity.register_on_chat_message(function(...)
+ amogus.parse_message(...)
+end)
+
+minetest.register_chatcommand("amogus_reload", {
+ func = function()
+ return amogus.reload(http, env, storage)
+ end
+})
+
+loadfile(minetest.get_modpath("amogus") .. "/bot.lua")()(http, env, storage)
+