From 61c45e9e7957a3a0950e8780d5af2843927f939f Mon Sep 17 00:00:00 2001 From: Madpeter <57852827+Madpeterz@users.noreply.github.com> Date: Thu, 7 Dec 2023 10:30:08 +0000 Subject: [PATCH] update command interface to be less bad --- SecondBotEvents/Services/CommandsService.cs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/SecondBotEvents/Services/CommandsService.cs b/SecondBotEvents/Services/CommandsService.cs index b75cf35..b63b9c5 100644 --- a/SecondBotEvents/Services/CommandsService.cs +++ b/SecondBotEvents/Services/CommandsService.cs @@ -184,9 +184,9 @@ namespace SecondBotEvents.Services return false; } - public KeyValuePair CommandInterfaceCaller(string message, bool requireSigning=false, bool viaCustomCommand=false) + public KeyValuePair CommandInterfaceCaller(string message, bool requireSigning=false, bool viaCustomCommand=false, string forceSetSource= "command interface") { - string source = "command interface"; + string source = forceSetSource; if(viaCustomCommand == true) { source = "customcommand"; @@ -197,10 +197,6 @@ namespace SecondBotEvents.Services return new KeyValuePair(false, "Not accepted via signing"); } KeyValuePair reply = RunCommand(C, viaCustomCommand); - if (C.replyTarget != null) - { - SmartCommandReply(C.replyTarget, reply.Value, C.command); - } return reply; } @@ -330,7 +326,12 @@ namespace SecondBotEvents.Services } return master.CustomCommandsService.RunCommand(C); } - return RunBaseCommand(C); + KeyValuePair reply = RunBaseCommand(C); + if (C.replyTarget != null) + { + SmartCommandReply(C.replyTarget, reply.Value, C.command); + } + return reply; } catch (Exception e)