添加12点大挑战终止
This commit is contained in:
parent
6fd8bd636f
commit
b6b7ad9257
Binary file not shown.
2618
dll/FunGame.Core.xml
2618
dll/FunGame.Core.xml
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@ -49,6 +49,12 @@ namespace Milimoe.RainBOT.ListeningTask
|
|||||||
return quick_reply;
|
return quick_reply;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (e.detail == "挑战结束" && e.user_id == GeneralSettings.Master)
|
||||||
|
{
|
||||||
|
await Bot.Unmute12ClockMembers();
|
||||||
|
return quick_reply;
|
||||||
|
}
|
||||||
|
|
||||||
if (GeneralSettings.IsMute && e.detail == "忏悔")
|
if (GeneralSettings.IsMute && e.detail == "忏悔")
|
||||||
{
|
{
|
||||||
if (!await Bot.CheckBlackList(false, e.user_id, e.user_id)) return quick_reply;
|
if (!await Bot.CheckBlackList(false, e.user_id, e.user_id)) return quick_reply;
|
||||||
|
|||||||
@ -108,6 +108,11 @@ namespace Milimoe.RainBOT.ListeningTask
|
|||||||
await Bot.SendGroupMessage(e.group_id, "12点大挑战", "欢迎加入12点大挑战。参加本挑战后,你将在每晚的12点获得8小时禁言和优质的睡眠,确保第二天的精神饱满!\r\n发送【加入12点】即可参加。");
|
await Bot.SendGroupMessage(e.group_id, "12点大挑战", "欢迎加入12点大挑战。参加本挑战后,你将在每晚的12点获得8小时禁言和优质的睡眠,确保第二天的精神饱满!\r\n发送【加入12点】即可参加。");
|
||||||
return quick_reply;
|
return quick_reply;
|
||||||
}
|
}
|
||||||
|
else if (e.detail == "挑战结束" && e.user_id == GeneralSettings.Master)
|
||||||
|
{
|
||||||
|
await Bot.Unmute12ClockMembers();
|
||||||
|
return quick_reply;
|
||||||
|
}
|
||||||
|
|
||||||
// 发图API
|
// 发图API
|
||||||
if (e.detail == "来图")
|
if (e.detail == "来图")
|
||||||
|
|||||||
@ -354,5 +354,29 @@ namespace Milimoe.RainBOT.Settings
|
|||||||
Console.WriteLine("已向12点大挑战的成员发放奖励。");
|
Console.WriteLine("已向12点大挑战的成员发放奖励。");
|
||||||
Console.ForegroundColor = ConsoleColor.Gray;
|
Console.ForegroundColor = ConsoleColor.Gray;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static async Task Unmute12ClockMembers()
|
||||||
|
{
|
||||||
|
foreach (long group_id in GroupMembers.Keys)
|
||||||
|
{
|
||||||
|
List<IContent> list = [];
|
||||||
|
foreach (Member m in GroupMembers[group_id])
|
||||||
|
{
|
||||||
|
if (GeneralSettings.Challenge12ClockGroup.Contains(m.user_id))
|
||||||
|
{
|
||||||
|
MuteRecall.Muted.Remove(m.user_id);
|
||||||
|
SetGroupBanContent content = new(group_id, m.user_id, 0);
|
||||||
|
list.Add(content);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (list.Count > 0)
|
||||||
|
{
|
||||||
|
await SendMessage(SupportedAPI.set_group_ban, group_id, "12点大挑战", list, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Console.ForegroundColor = ConsoleColor.Magenta;
|
||||||
|
Console.WriteLine("已解禁所有参与12点大挑战的成员。");
|
||||||
|
Console.ForegroundColor = ConsoleColor.Gray;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
using System.Drawing;
|
using Milimoe.OneBot.Framework.Utility;
|
||||||
using Milimoe.OneBot.Framework.Utility;
|
|
||||||
|
|
||||||
namespace Milimoe.RainBOT.Settings
|
namespace Milimoe.RainBOT.Settings
|
||||||
{
|
{
|
||||||
|
|||||||
@ -3,8 +3,8 @@
|
|||||||
public class OSMCore
|
public class OSMCore
|
||||||
{
|
{
|
||||||
public const string version = "v1.0";
|
public const string version = "v1.0";
|
||||||
public const string version2 = "Patch9";
|
public const string version2 = "Patch10";
|
||||||
public const string time = "Aug. 12th 2024";
|
public const string time = "Sep. 12th 2024";
|
||||||
|
|
||||||
public static string Info => $"OSM Core {version} {version2}\r\nAuthor: Milimoe\r\nBuilt on {time}\r\nSee: https://github.com/milimoe";
|
public static string Info => $"OSM Core {version} {version2}\r\nAuthor: Milimoe\r\nBuilt on {time}\r\nSee: https://github.com/milimoe";
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user