hold on what
This commit is contained in:
parent
48384ef229
commit
0777a6bf11
11
src/main.lua
11
src/main.lua
@ -16,10 +16,13 @@ Client:on('ready', function()
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
local function RunCallback(Callback, Interaction, Command, Args)
|
local function RunCallback(Callback, Interaction, Command, Args)
|
||||||
local Success, Return = pcall(Callback, Interaction, Command, Args)
|
local Success, Return = pcall(Callback, Interaction, Command, Args)
|
||||||
if not Success then
|
if not Success then
|
||||||
Interaction:reply('Error encountered when trying to run command: '..tostring(Return), true)
|
if type(Return) == "table" then
|
||||||
end
|
table.foreach(Return, print)
|
||||||
|
end
|
||||||
|
Interaction:reply('Error encountered when trying to run command: '..tostring(Return), true)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
Client:on('slashCommand', function(Interaction, Command, Args)
|
Client:on('slashCommand', function(Interaction, Command, Args)
|
||||||
|
Loading…
Reference in New Issue
Block a user