From 0777a6bf11a8377d676fbc5e83cda41988229ad4 Mon Sep 17 00:00:00 2001 From: tommy Date: Fri, 27 Sep 2024 17:52:22 -0400 Subject: [PATCH] hold on what --- src/main.lua | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/main.lua b/src/main.lua index 110f925..1bd81fb 100644 --- a/src/main.lua +++ b/src/main.lua @@ -16,10 +16,13 @@ Client:on('ready', function() end) local function RunCallback(Callback, Interaction, Command, Args) - local Success, Return = pcall(Callback, Interaction, Command, Args) - if not Success then - Interaction:reply('Error encountered when trying to run command: '..tostring(Return), true) - end + local Success, Return = pcall(Callback, Interaction, Command, Args) + if not Success then + if type(Return) == "table" then + table.foreach(Return, print) + end + Interaction:reply('Error encountered when trying to run command: '..tostring(Return), true) + end end Client:on('slashCommand', function(Interaction, Command, Args)