From eefc938440f6eee0943d739b820a39f69a4abc65 Mon Sep 17 00:00:00 2001 From: pk5ls20 Date: Sun, 3 Nov 2024 20:39:46 +0800 Subject: [PATCH 1/2] [OneBot] Better PokeSegment Compatibility --- Lagrange.OneBot/Message/Entity/PokeSegment.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lagrange.OneBot/Message/Entity/PokeSegment.cs b/Lagrange.OneBot/Message/Entity/PokeSegment.cs index e122fa0c6..43c2d2407 100644 --- a/Lagrange.OneBot/Message/Entity/PokeSegment.cs +++ b/Lagrange.OneBot/Message/Entity/PokeSegment.cs @@ -13,7 +13,7 @@ public PokeSegment() : this(0, 0) { } [JsonPropertyName("strength")] public string? Strength { get; set; } = strength.ToString(); - [JsonPropertyName("id")] [CQProperty] public string Id { get; set; } = string.Empty; + [JsonPropertyName("id")] [CQProperty] public int Id { get; set; } = -1; // can not get id } [SegmentSubscriber(typeof(PokeEntity), "poke")] From 5d848f21adc254524e71a1657040832611cfc59f Mon Sep 17 00:00:00 2001 From: pk5ls20 Date: Sun, 3 Nov 2024 20:45:33 +0800 Subject: [PATCH 2/2] [OneBot] Better PokeSegment Compatibility x2 --- Lagrange.OneBot/Message/Entity/PokeSegment.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lagrange.OneBot/Message/Entity/PokeSegment.cs b/Lagrange.OneBot/Message/Entity/PokeSegment.cs index 43c2d2407..3cf15aa2b 100644 --- a/Lagrange.OneBot/Message/Entity/PokeSegment.cs +++ b/Lagrange.OneBot/Message/Entity/PokeSegment.cs @@ -13,7 +13,7 @@ public PokeSegment() : this(0, 0) { } [JsonPropertyName("strength")] public string? Strength { get; set; } = strength.ToString(); - [JsonPropertyName("id")] [CQProperty] public int Id { get; set; } = -1; // can not get id + [JsonPropertyName("id")] [CQProperty] public string Id { get; set; } = "-1"; // can not get id } [SegmentSubscriber(typeof(PokeEntity), "poke")]