This commit is contained in:
tommy aka doge 2022-04-03 18:48:13 -04:00
parent 9126a2a841
commit 4b369ac221
4 changed files with 2 additions and 1 deletions

1
.gitignore vendored
View File

@ -2,5 +2,4 @@ discordia.log
gateway.json gateway.json
apikey.lua apikey.lua
token.lua token.lua
restart.txt
deps deps

BIN
README.md

Binary file not shown.

0
restart.txt Normal file
View File

View File

@ -1,6 +1,7 @@
local discordia=require('discordia') local discordia=require('discordia')
discordia.extensions() discordia.extensions()
local commands={command_list={}} local commands={command_list={}}
_G.init=false
setmetatable(commands.command_list,{__index=function(self,index) setmetatable(commands.command_list,{__index=function(self,index)
for i,v in pairs(self) do for i,v in pairs(self) do
for i2,v2 in pairs(v.alias) do for i2,v2 in pairs(v.alias) do
@ -28,6 +29,7 @@ function commands:Get(name)
end end
function commands:INIT() function commands:INIT()
-- self.command_list={} -- self.command_list={}
_G.init=true
for file in io.popen([[dir "./src/modules/commands" /b]]):lines() do require('./commands/'..file) end for file in io.popen([[dir "./src/modules/commands" /b]]):lines() do require('./commands/'..file) end
print('commands done') print('commands done')
end end