From 7327f94fd9bbe3464b5c558ad3f7252bc363e438 Mon Sep 17 00:00:00 2001 From: Astoria Floyd Date: Sat, 7 Aug 2021 22:26:42 -0500 Subject: [PATCH] Added folders. --- rng.lua => API/rng.lua | 2 +- tools.lua => API/tools.lua | 4 ++-- bot.lua | 6 +++--- complexCommands.lua => commands/complexCommands.lua | 6 +++--- simpleCommands.lua => commands/simpleCommands.lua | 2 +- settings.lua => docs/settings.lua | 0 startBot.sh | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) rename rng.lua => API/rng.lua (92%) rename tools.lua => API/tools.lua (92%) rename complexCommands.lua => commands/complexCommands.lua (91%) rename simpleCommands.lua => commands/simpleCommands.lua (94%) rename settings.lua => docs/settings.lua (100%) diff --git a/rng.lua b/API/rng.lua similarity index 92% rename from rng.lua rename to API/rng.lua index adbce1d..b1c4727 100644 --- a/rng.lua +++ b/API/rng.lua @@ -1,5 +1,5 @@ local rng = {} -local tools = dofile("./tools.lua") +local tools = dofile("./API/tools.lua") --Rolls a d20, if output is 1, Critical miss(or Shit), if output is 20, critical hit. function rng.d20() diff --git a/tools.lua b/API/tools.lua similarity index 92% rename from tools.lua rename to API/tools.lua index 7751f34..a12e606 100644 --- a/tools.lua +++ b/API/tools.lua @@ -9,8 +9,8 @@ end --Initializes commands. function tools.initialize() - local simpleCommands = dofile("./simpleCommands.lua") - local complexCommands = dofile("./complexCommands.lua") + local simpleCommands = dofile("./commands/simpleCommands.lua") + local complexCommands = dofile("./commands/complexCommands.lua") local complexCommands = complexCommands.initialize() local simpleCommands = simpleCommands.initialize() local commands = tools.tableMerge(simpleCommands, complexCommands) diff --git a/bot.lua b/bot.lua index b50e6be..53b8863 100644 --- a/bot.lua +++ b/bot.lua @@ -1,6 +1,6 @@ local discordia = require('discordia') local client = discordia.Client() -Tools = dofile("./tools.lua") +Tools = dofile("./API/tools.lua") discordia.extensions() --Setup bot here, initializes bot @@ -29,7 +29,7 @@ client:on('messageCreate', function(message) message:reply("You cannot re-initialize this bot!") else Commands = Tools.initialize() - Tools = dofile("./tools.lua") + Tools = dofile("./API/tools.lua") message:reply("Re-Initialized!") end end @@ -46,7 +46,7 @@ client:on('userBan', function() end) --Insert Token in a .lua file with simply returns it as a string. -local token = require("./token.lua") +local token = require("./docs/token.lua") client:run('Bot '..token) -- This project is libre, and licenced under the terms of the -- DO WHAT THE FUCK YOU WANT TO PUBLIC LICENCE, version 3.1, diff --git a/complexCommands.lua b/commands/complexCommands.lua similarity index 91% rename from complexCommands.lua rename to commands/complexCommands.lua index 71a181e..c930edf 100644 --- a/complexCommands.lua +++ b/commands/complexCommands.lua @@ -1,8 +1,8 @@ -local tools = dofile("./tools.lua") -local rng = dofile("./rng.lua") +local tools = dofile("./API/tools.lua") +local rng = dofile("./API/rng.lua") local complexCommands = {} -local prefix = dofile("./settings.lua") +local prefix = dofile("./docs/settings.lua") local commands = { -- Define commands its a table that will contain our commands [prefix..'helpme'] = { -- Dumps docs/help to chat, took me forever to figure out. diff --git a/simpleCommands.lua b/commands/simpleCommands.lua similarity index 94% rename from simpleCommands.lua rename to commands/simpleCommands.lua index 54d2998..86a4300 100644 --- a/simpleCommands.lua +++ b/commands/simpleCommands.lua @@ -1,5 +1,5 @@ local basicCommands = {} -local prefix = dofile("./settings.lua") +local prefix = dofile("./docs/settings.lua") local commands = { -- Define commands its a table that will contain our commands [prefix..'lenny'] = { -- Creates a lenny face diff --git a/settings.lua b/docs/settings.lua similarity index 100% rename from settings.lua rename to docs/settings.lua diff --git a/startBot.sh b/startBot.sh index 4c81ddf..29df5fb 100644 --- a/startBot.sh +++ b/startBot.sh @@ -1 +1 @@ -luvit bot.lua +luvit bot.lua \ No newline at end of file