diff --git a/.gitignore b/.gitignore index 2d9e590..80f41b4 100644 --- a/.gitignore +++ b/.gitignore @@ -2,5 +2,4 @@ discordia.log gateway.json apikey.lua token.lua -restart.txt deps \ No newline at end of file diff --git a/README.md b/README.md index e8e7f82..1906b43 100644 Binary files a/README.md and b/README.md differ diff --git a/restart.txt b/restart.txt new file mode 100644 index 0000000..e69de29 diff --git a/src/modules/commands.lua b/src/modules/commands.lua index 2de74f6..0c477e9 100644 --- a/src/modules/commands.lua +++ b/src/modules/commands.lua @@ -1,6 +1,7 @@ local discordia=require('discordia') discordia.extensions() local commands={command_list={}} +_G.init=false setmetatable(commands.command_list,{__index=function(self,index) for i,v in pairs(self) do for i2,v2 in pairs(v.alias) do @@ -28,6 +29,7 @@ function commands:Get(name) end function commands:INIT() -- self.command_list={} + _G.init=true for file in io.popen([[dir "./src/modules/commands" /b]]):lines() do require('./commands/'..file) end print('commands done') end