From 5ec456e2686c954b1b2328ae707da7b1d3362f6f Mon Sep 17 00:00:00 2001 From: ishkong <19740260+ishkong@users.noreply.github.com> Date: Fri, 8 Nov 2024 18:50:00 +0800 Subject: [PATCH] Update GetGroupHonorInfoOperation.cs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 是。。是这个意思吗? --- .../Core/Operation/Group/GetGroupHonorInfoOperation.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Lagrange.OneBot/Core/Operation/Group/GetGroupHonorInfoOperation.cs b/Lagrange.OneBot/Core/Operation/Group/GetGroupHonorInfoOperation.cs index 03c892d68..4efb8204d 100644 --- a/Lagrange.OneBot/Core/Operation/Group/GetGroupHonorInfoOperation.cs +++ b/Lagrange.OneBot/Core/Operation/Group/GetGroupHonorInfoOperation.cs @@ -83,10 +83,8 @@ private static void ProcessJsonObject(JsonObject jsonObject) { foreach (var oldKey in KeyToOnebot11.Keys) { - if (jsonObject.ContainsKey(oldKey)) + if (jsonObject.Remove(oldKey, out var nodeValue)) { - var nodeValue = jsonObject[oldKey]; - jsonObject.Remove(oldKey); jsonObject[KeyToOnebot11[oldKey]] = nodeValue; } }