From c163884d70bf84f86b5bcd6ee73a422cf0874ca8 Mon Sep 17 00:00:00 2001 From: Chr_ Date: Thu, 23 Nov 2023 13:04:51 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E4=BF=AE=E6=AD=A3=20VOTE=20=E9=80=BB?= =?UTF-8?q?=E8=BE=91bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ASFEnhance/Event/WebRequest.cs | 7 ++++--- Directory.Build.props | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ASFEnhance/Event/WebRequest.cs b/ASFEnhance/Event/WebRequest.cs index 46412b69..d45d3191 100644 --- a/ASFEnhance/Event/WebRequest.cs +++ b/ASFEnhance/Event/WebRequest.cs @@ -179,6 +179,7 @@ internal sealed record NominatePayload /// /// /// + /// /// internal static async Task MakeVote(Bot bot, int gameID, int categoryID, string token, SemaphoreSlim semaphore) { @@ -189,9 +190,9 @@ internal static async Task MakeVote(Bot bot, int gameID, int categoryID, string { CategoryId = categoryID, NominatedId = gameID, - Source = 3, + Source = 7, }; - var enc = ProtoBufEncode(payload); + var enc = ProtoBufEncode(payload).Replace("=", "%3D").Replace("+", "%2B"); var request = new Uri(SteamApiURL, $"ISteamAwardsService/Nominate/v1?access_token={token}&origin=https://store.steampowered.com&input_protobuf_encoded={enc}"); @@ -199,7 +200,7 @@ internal static async Task MakeVote(Bot bot, int gameID, int categoryID, string } finally { - await Task.Delay(500).ConfigureAwait(false); + await Task.Delay(800).ConfigureAwait(false); semaphore.Release(); } } diff --git a/Directory.Build.props b/Directory.Build.props index 8feda808..e6393cc5 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,6 +1,6 @@ - 2.0.1.2 + 2.0.1.3