From 6def5f65cf1247116c1392d9d2cf7717b3194a39 Mon Sep 17 00:00:00 2001 From: Madpeter <57852827+Madpeterz@users.noreply.github.com> Date: Tue, 4 Feb 2025 02:02:07 +0000 Subject: [PATCH] fix ? entrys for command history sources --- SecondBotEvents/Services/CommandsService.cs | 4 ++-- SecondBotEvents/Services/DiscordService.cs | 2 +- SecondBotEvents/Services/HttpService.cs | 2 +- SecondBotEvents/Services/RLVService.cs | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/SecondBotEvents/Services/CommandsService.cs b/SecondBotEvents/Services/CommandsService.cs index 65ca489..4e97ec4 100644 --- a/SecondBotEvents/Services/CommandsService.cs +++ b/SecondBotEvents/Services/CommandsService.cs @@ -225,7 +225,7 @@ namespace SecondBotEvents.Services { return new KeyValuePair(false, "Not accepted via signing"); } - KeyValuePair reply = RunCommand(C, viaCustomCommand, source); + KeyValuePair reply = RunCommand(source, C, viaCustomCommand); return reply; } @@ -336,7 +336,7 @@ namespace SecondBotEvents.Services return new KeyValuePair(false, e.Message); } } - public KeyValuePair RunCommand(SignedCommand C, bool inCustomCommand=false, string source="?") + public KeyValuePair RunCommand(string source, SignedCommand C, bool inCustomCommand=false) { if(acceptNewCommands == false) { diff --git a/SecondBotEvents/Services/DiscordService.cs b/SecondBotEvents/Services/DiscordService.cs index 4964bdd..d6eb68d 100644 --- a/SecondBotEvents/Services/DiscordService.cs +++ b/SecondBotEvents/Services/DiscordService.cs @@ -392,7 +392,7 @@ namespace SecondBotEvents.Services protected void RunCommandFromMessage(SignedCommand C, SocketMessage message) { - KeyValuePair reply = master.CommandsService.RunCommand(C); + KeyValuePair reply = master.CommandsService.RunCommand("Discord",C); string replyEmote = "✅"; if (reply.Key == false) { diff --git a/SecondBotEvents/Services/HttpService.cs b/SecondBotEvents/Services/HttpService.cs index e4b8096..6bbf998 100644 --- a/SecondBotEvents/Services/HttpService.cs +++ b/SecondBotEvents/Services/HttpService.cs @@ -339,7 +339,7 @@ namespace SecondBotEvents.Services { return "Command request rejected"; } - return JsonConvert.SerializeObject(master.CommandsService.RunCommand(C)); + return JsonConvert.SerializeObject(master.CommandsService.RunCommand("HTTP",C)); } } } diff --git a/SecondBotEvents/Services/RLVService.cs b/SecondBotEvents/Services/RLVService.cs index af5f870..6f537a2 100644 --- a/SecondBotEvents/Services/RLVService.cs +++ b/SecondBotEvents/Services/RLVService.cs @@ -524,7 +524,7 @@ namespace SecondBotEvents.Services } string[] args = { sitTarget.ToString() }; SignedCommand C = new SignedCommand(master.CommandsService, "rlv", "Sit", null, args, 0, "", false, 0, "", false); - master.CommandsService.RunCommand(C); + master.CommandsService.RunCommand("RLV",C); } break; @@ -533,7 +533,7 @@ namespace SecondBotEvents.Services { // stand SignedCommand C = new SignedCommand(master.CommandsService, "rlv", "Stand", null, new string[] { }, 0, "", false, 0, "", false); - master.CommandsService.RunCommand(C); + master.CommandsService.RunCommand("RLV", C); } break;