diff --git a/src/ListeningTask/GroupMessageTask.cs b/src/ListeningTask/GroupMessageTask.cs index fa588e2..b379a2f 100644 --- a/src/ListeningTask/GroupMessageTask.cs +++ b/src/ListeningTask/GroupMessageTask.cs @@ -557,7 +557,7 @@ namespace Milimoe.RainBOT.ListeningTask } // 随机叫哥 - if (GeneralSettings.IsCallBrother && e.CheckThrow(GeneralSettings.PCallBrother, out dice)) + if (GeneralSettings.IsCallBrother && !Ignore.CallBrotherQQIgnore.Contains(e.user_id) && e.CheckThrow(GeneralSettings.PCallBrother, out dice)) { int delay = GeneralSettings.RepeatDelay[0] + new Random().Next(GeneralSettings.RepeatDelay[1]); Bot.ColorfulCheckPass(sender, "随机叫哥", dice, GeneralSettings.PCallBrother, delay); diff --git a/src/Settings/Ignore.cs b/src/Settings/Ignore.cs index 984881e..b2a58a7 100644 --- a/src/Settings/Ignore.cs +++ b/src/Settings/Ignore.cs @@ -6,7 +6,7 @@ namespace Milimoe.RainBOT.Settings { public static HashSet RepeatIgnore { get; set; } = []; - public static List CallBrotherQQIgnore { get; set; } = []; + public static List CallBrotherQQIgnore { get; set; } = []; /// /// 这个属性暂时没用到 标记一下 @@ -25,7 +25,7 @@ namespace Milimoe.RainBOT.Settings } if (configs.TryGetValue("CallBrotherQQIgnore", out value) && value != null) { - CallBrotherQQIgnore = new List((List)value); + CallBrotherQQIgnore = new List((List)value); } if (configs.TryGetValue("QQGroupIgnore", out value) && value != null) { @@ -52,8 +52,8 @@ namespace Milimoe.RainBOT.Settings else RepeatIgnore.Remove((string)value); break; case "callbrotherqqignore": - if (isadd) CallBrotherQQIgnore.Add((string)value); - else CallBrotherQQIgnore.Remove((string)value); + if (isadd) CallBrotherQQIgnore.Add((long)value); + else CallBrotherQQIgnore.Remove((long)value); break; case "qqgroupignore": if (isadd) QQGroupIgnore.Add((long)value); @@ -79,7 +79,7 @@ namespace Milimoe.RainBOT.Settings list = [..RepeatIgnore]; break; case "callbrotherqqignore": - list = CallBrotherQQIgnore; + list = CallBrotherQQIgnore.Select(x => x.ToString()).ToList(); break; case "qqgroupignore": list = QQGroupIgnore.Select(x => x.ToString()).ToList();