correct mode to Mode

pull/3/head
Astoria Floyd 3 years ago
parent 209f1207a5
commit 4ea3e9b419

@ -8,22 +8,22 @@ client:once("ready", function()
client:setGame("Astoria's bot, very sad!") client:setGame("Astoria's bot, very sad!")
print('Logged in as '.. client.user.username) print('Logged in as '.. client.user.username)
Commands = Tools.initialize() Commands = Tools.initialize()
mode = Tools.getMode() Mode = Tools.getMode()
end) end)
--Command handler --Command handler
client:on('messageCreate', function(message) client:on('messageCreate', function(message)
if message.author.bot then return end if message.author.bot then return end
mode = Tools.getMode() Mode = Tools.getMode()
if mode == "test" then if Mode == "test" then
Tools.setReinit(true) Tools.setReinit(true)
end end
if mode == "normal" and Tools.getReinit() == false then if Mode == "normal" and Tools.getReinit() == false then
Tools.setReinit(false) Tools.setReinit(false)
end end
if mode == "normal" and Tools.messageDectection(message, "reinitialize") == true then if Mode == "normal" and Tools.messageDectection(message, "reinitialize") == true then
reinitialize() reinitialize()
elseif mode == "test" and Tools.messageDectection(message, "reinitialize") == true then elseif Mode == "test" and Tools.messageDectection(message, "reinitialize") == true then
message:reply("You cannot preform this command because test is on!") message:reply("You cannot preform this command because test is on!")
end end
if Tools.getReinit() == true then if Tools.getReinit() == true then
@ -39,6 +39,7 @@ client:on('messageCreate', function(message)
end end
end) end)
---@diagnostic disable-next-line: lowercase-global
function reinitialize(message) function reinitialize(message)
local user = message.guild:getMember(message.author.id) local user = message.guild:getMember(message.author.id)
if Tools.messageDectection(message, "reinitialize") == true then if Tools.messageDectection(message, "reinitialize") == true then

Loading…
Cancel
Save