a
This commit is contained in:
parent
9126a2a841
commit
4b369ac221
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,5 +2,4 @@ discordia.log
|
|||||||
gateway.json
|
gateway.json
|
||||||
apikey.lua
|
apikey.lua
|
||||||
token.lua
|
token.lua
|
||||||
restart.txt
|
|
||||||
deps
|
deps
|
0
restart.txt
Normal file
0
restart.txt
Normal 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
|
||||||
|
Loading…
Reference in New Issue
Block a user