diff --git a/ASFEnhance/ASFEnhance.cs b/ASFEnhance/ASFEnhance.cs index a8e4af5..5a44655 100644 --- a/ASFEnhance/ASFEnhance.cs +++ b/ASFEnhance/ASFEnhance.cs @@ -248,11 +248,11 @@ public Task OnLoaded() "V" or "VOTE" when access >= EAccess.Operator => - Event.Command.ResponseAutumnSteamAwardVote(bot, ""), + Event.Command.ResponseWinterSteamAwardVote(bot, ""), "CV" or "CHECKVOTE" when access >= EAccess.Operator => - Event.Command.ResponseCheckAutumnSteamAwardVote(bot), + Event.Command.ResponseCheckWinterSteamAwardVote(bot), //Shortcut "P" => @@ -503,14 +503,14 @@ public Task OnLoaded() "V" or "VOTE" when argLength > 2 && access >= EAccess.Operator => - Event.Command.ResponseAutumnSteamAwardVote(args[1], Utilities.GetArgsAsText(args, 2, ",")), + Event.Command.ResponseWinterSteamAwardVote(args[1], Utilities.GetArgsAsText(args, 2, ",")), "V" or "VOTE" when access >= EAccess.Operator => - Event.Command.ResponseAutumnSteamAwardVote(args[1], ""), + Event.Command.ResponseWinterSteamAwardVote(args[1], ""), "CV" or "CHECKVOTE" when access >= EAccess.Operator => - Event.Command.ResponseCheckAutumnSteamAwardVote(Utilities.GetArgsAsText(args, 1, ",")), + Event.Command.ResponseCheckWinterSteamAwardVote(Utilities.GetArgsAsText(args, 1, ",")), //Shortcut "AL" => diff --git a/ASFEnhance/Event/Command.cs b/ASFEnhance/Event/Command.cs index 5e29f9e..a19313e 100644 --- a/ASFEnhance/Event/Command.cs +++ b/ASFEnhance/Event/Command.cs @@ -6,7 +6,7 @@ namespace ASFEnhance.Event; internal static class Command { - private const int categoryBegin = 110; + private const int CategoryBegin = 110; /// /// 获取DL2贴纸 6.28 - ? @@ -127,7 +127,7 @@ internal static class Command return FormatStaticResponse(Strings.BotNotFound, botNames); } - var results = await Utilities.InParallel(bots.Select(bot => ResponseClaimItem(bot))).ConfigureAwait(false); + var results = await Utilities.InParallel(bots.Select(ResponseClaimItem)).ConfigureAwait(false); var responses = new List(results.Where(result => !string.IsNullOrEmpty(result))); return responses.Count > 0 ? string.Join(Environment.NewLine, responses) : null; @@ -195,7 +195,7 @@ internal static class Command return FormatStaticResponse(Strings.BotNotFound, botNames); } - var results = await Utilities.InParallel(bots.Select(bot => ResponseClaim20Th(bot))).ConfigureAwait(false); + var results = await Utilities.InParallel(bots.Select(ResponseClaim20Th)).ConfigureAwait(false); var responses = new List(results.Where(result => !string.IsNullOrEmpty(result))); return responses.Count > 0 ? string.Join(Environment.NewLine, responses) : null; @@ -227,7 +227,7 @@ internal static class Command continue; } - intGamsIDs.Add(choice); + intGamsIDs.Add(choice); if (intGamsIDs.Count >= categories) { break; @@ -257,7 +257,7 @@ internal static class Command for (var i = 0; i < categories; i++) { - tasks.Add(WebRequest.MakeVoteForAutumnSale(bot, intGamsIDs[i], categoryBegin + i, token, semaphore)); + tasks.Add(WebRequest.MakeVoteForAutumnSale(bot, intGamsIDs[i], CategoryBegin + i, token, semaphore)); } await Utilities.InParallel(tasks).ConfigureAwait(false); @@ -375,7 +375,7 @@ internal static class Command if (intGamsIDs.Count < categories) //不足11个游戏自动补齐 { List defaultGames = - [2358720, 2669410, 548430, 2230650, 1623730, 2358720, 2679460, 2358720, 2358720, 2704110, 3097560]; + [2358720, 2669410, 413150, 2379780, 1623730, 1145350, 2379780, 2358720, 2396980, 2358720, 2198150]; while (intGamsIDs.Count < categories) { intGamsIDs.Add(defaultGames[intGamsIDs.Count]); @@ -395,7 +395,7 @@ internal static class Command for (var i = 0; i < categories; i++) { - tasks.Add(WebRequest.MakeWinterSteamAwardVote(bot, intGamsIDs[i], categoryBegin + i, token, semaphore)); + tasks.Add(WebRequest.MakeWinterSteamAwardVote(bot, intGamsIDs[i], CategoryBegin + i, token, semaphore)); } await Utilities.InParallel(tasks).ConfigureAwait(false); @@ -476,7 +476,7 @@ internal static class Command return FormatStaticResponse(Strings.BotNotFound, botNames); } - var results = await Utilities.InParallel(bots.Select(bot => ResponseCheckWinterSteamAwardVote(bot))) + var results = await Utilities.InParallel(bots.Select(ResponseCheckWinterSteamAwardVote)) .ConfigureAwait(false); var responses = new List(results.Where(result => !string.IsNullOrEmpty(result))!); diff --git a/ASFEnhance/Event/WebRequest.cs b/ASFEnhance/Event/WebRequest.cs index 4f014cd..93000ac 100644 --- a/ASFEnhance/Event/WebRequest.cs +++ b/ASFEnhance/Event/WebRequest.cs @@ -230,7 +230,7 @@ internal static async Task MakeWinterSteamAwardVote(Bot bot, int gameID, int cat try { await semaphore.WaitAsync().ConfigureAwait(false); - var payload = new NominatePayload { CategoryId = categoryID, NominatedId = gameID, Source = 2640290 }; + var payload = new NominatePayload { CategoryId = categoryID, NominatedId = gameID, Source = 3334340 }; var data = new Dictionary(1, StringComparer.Ordinal) { @@ -254,7 +254,7 @@ internal static async Task MakeWinterSteamAwardVote(Bot bot, int gameID, int cat /// internal static async Task CheckWinterSteamAwardVote(Bot bot) { - var request = new Uri(SteamStoreURL, "/steamawards"); + var request = new Uri(SteamStoreURL, "/steamawards/2024"); var response = await bot.ArchiWebHandler.UrlGetToHtmlDocumentWithSession(request).ConfigureAwait(false); if (response == null) diff --git a/Directory.Build.props b/Directory.Build.props index cdffc81..30f55ec 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,6 +1,6 @@ - 2.3.2.0 + 2.3.2.1