新SC规则

This commit is contained in:
milimoe 2025-09-01 00:49:44 +08:00
parent a1c64d42d1
commit 0f38b79603
Signed by: milimoe
GPG Key ID: 9554D37E4B8991D0
2 changed files with 28 additions and 1 deletions

View File

@ -107,6 +107,20 @@ namespace Milimoe.RainBOT.ListeningTask
return quick_reply; 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 (e.detail.Contains("圣人榜"))
{ {
if (!await Bot.CheckBlackList(true, e.user_id, e.group_id)) return quick_reply; if (!await Bot.CheckBlackList(true, e.user_id, e.group_id)) return quick_reply;

View File

@ -224,7 +224,7 @@ namespace Milimoe.RainBOT.Settings
{ {
if (sc == 0) if (sc == 0)
{ {
sc = Random.Shared.Next(-3, 4); sc = Random.Shared.Next(-1, 4);
if (sc == 0) if (sc == 0)
{ {
return; 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<string, object> 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) public async Task SCRecord(long groupid, long qq)
{ {
if (HTTPClient != null) if (HTTPClient != null)