summaryrefslogtreecommitdiff
path: root/bot.lua
diff options
context:
space:
mode:
authorElias Fleckenstein <eliasfleckenstein@web.de>2021-09-13 16:15:50 +0200
committerElias Fleckenstein <eliasfleckenstein@web.de>2021-09-13 16:15:50 +0200
commit3f037bf26080729e0e3308d0b58820f9ac466d4f (patch)
tree480650104e67c2b6158cee59ed3e0243e2709e4b /bot.lua
parent07c7d01a1fcbdb369e474d296ad80cd4495f2a07 (diff)
downloadfurrybot-3f037bf26080729e0e3308d0b58820f9ac466d4f.tar.xz
Add operator commands
Diffstat (limited to 'bot.lua')
-rw-r--r--bot.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/bot.lua b/bot.lua
index c92e8f9..e756139 100644
--- a/bot.lua
+++ b/bot.lua
@@ -37,7 +37,7 @@ function furrybot.error_message(player, error, detail)
end
function furrybot.parse_message(player, message, discord)
- if message:find("!") == 1 then
+ if message:find("!") == 1 and not furrybot.ignored[player] then
local args = message:sub(2, #message):split(" ")
local cmd = table.remove(args, 1)
local func = furrybot.commands[cmd]
@@ -65,10 +65,10 @@ function furrybot.reload()
if not status then
furrybot = old_fb
- return false, furrybot.colors.error .. "Error: " .. furrybot.colors.detail .. init
+ furrybot.send("Error: " .. furrybot.colors.detail .. init, furrybot.colors.error)
end
else
- return false, furrybot.colors.error .. "Syntax error: " .. furrybot.colors.detail .. err
+ furrybot.send("Syntax error: " .. furrybot.colors.detail .. err, furrybot.colors.error)
end
end
@@ -201,7 +201,7 @@ end
return function(_http, _env, _storage)
http, env, storage = _http, _env, _storage
- for _, f in ipairs {"nsfw", "roleplay", "death", "economy", "random", "http"} do
+ for _, f in ipairs {"nsfw", "roleplay", "death", "economy", "random", "http", "operator"} do
local func, err = env.loadfile("clientmods/furrybot/" .. f .. ".lua")
if not func then