From 0f38b79603cc2c8b0d44955a8ac9d8ebf91e5487 Mon Sep 17 00:00:00 2001 From: milimoe Date: Mon, 1 Sep 2025 00:49:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0SC=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ListeningTask/GroupMessageTask.cs | 14 ++++++++++++++ src/Settings/OshimaController.cs | 15 ++++++++++++++- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/src/ListeningTask/GroupMessageTask.cs b/src/ListeningTask/GroupMessageTask.cs index d32d358..6b1c277 100644 --- a/src/ListeningTask/GroupMessageTask.cs +++ b/src/ListeningTask/GroupMessageTask.cs @@ -107,6 +107,20 @@ namespace Milimoe.RainBOT.ListeningTask return quick_reply; } + if (e.detail.Contains("月度圣人")) + { + if (!await Bot.CheckBlackList(true, e.user_id, e.group_id)) return quick_reply; + _ = OshimaController.Instance.SCList_Backup(e.group_id, e.user_id); + return quick_reply; + } + + if (e.detail.Contains("月度出生")) + { + if (!await Bot.CheckBlackList(true, e.user_id, e.group_id)) return quick_reply; + _ = OshimaController.Instance.SCList_Backup(e.group_id, e.user_id, true); + return quick_reply; + } + if (e.detail.Contains("圣人榜")) { if (!await Bot.CheckBlackList(true, e.user_id, e.group_id)) return quick_reply; diff --git a/src/Settings/OshimaController.cs b/src/Settings/OshimaController.cs index 24aa257..d3ded10 100644 --- a/src/Settings/OshimaController.cs +++ b/src/Settings/OshimaController.cs @@ -224,7 +224,7 @@ namespace Milimoe.RainBOT.Settings { if (sc == 0) { - sc = Random.Shared.Next(-3, 4); + sc = Random.Shared.Next(-1, 4); if (sc == 0) { return; @@ -257,6 +257,19 @@ namespace Milimoe.RainBOT.Settings } } + public async Task SCList_Backup(long groupid, long qq, bool reverse = false) + { + if (HTTPClient != null) + { + Dictionary data = []; + data.Add("command", "sclist_backup"); + data.Add("groupid", groupid); + data.Add("qq", qq); + data.Add("reverse", reverse); + await HTTPClient.Send(SocketMessageType.AnonymousGameServer, ServerName, data); + } + } + public async Task SCRecord(long groupid, long qq) { if (HTTPClient != null)