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)