Skip to content
This repository was archived by the owner on Sep 2, 2023. It is now read-only.

Commit 573c569

Browse files
author
Awbugl
committed
Fix Dismiss when operator is Bot Master
1 parent 1a57f27 commit 573c569

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

Andreal/Data/Sqlite/BotUserInfo.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ internal static void Set(BotUserInfo user)
4040
internal enum ImgVersion
4141
{
4242
ImgV1 = 0,
43-
ImgV2 = 1,
44-
ImgV3 = 2,
45-
ImgV4 = 3
43+
ImgV2,
44+
ImgV3,
45+
ImgV4
4646
}
4747
}

Andreal/Executor/OtherExecutor.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ private async Task<MessageChain> Jrrp() =>
3434
private async Task<MessageChain?> Dismiss()
3535
{
3636
if (Info.Message.Chain.FindChain<AtChain>()?.Any(i => i.AtUin == Info.Bot.Uin) != true) return null;
37-
if (!IsGroup || !await Info.PermissionCheck()) return null;
37+
if (!IsGroup) return null;
38+
if (!Info.MasterCheck() && !await Info.PermissionCheck()) return null;
3839

3940
Info.SendMessage(RobotReply.GroupLeave);
4041
await Task.Delay(5000);

Andreal/Program.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public static async Task Main()
3838
Console.WriteLine(@"| ' </ _ | ' \/ _` | _/ _` |");
3939
Console.WriteLine(@"|_|\_\___|_||_\__,_\__|\__,_|");
4040

41-
Console.WriteLine("Konata. Konata Project 2022\nProject Andreal v0.2.8 on Konata\n\n");
41+
Console.WriteLine("Konata. Konata Project 2022\nProject Andreal v0.2.9 on Konata\n\n");
4242

4343
External.Initialize(Config);
4444

@@ -110,8 +110,6 @@ private static void OnCaptcha(Bot b, CaptchaEvent e)
110110
case CaptchaEvent.CaptchaType.Slider:
111111

112112
Console.ForegroundColor = ConsoleColor.Red;
113-
Console.WriteLine("需要滑块验证,请使用验证助手扫码验证:");
114-
Console.WriteLine("若显示错误,请将控制台的字体更换为新宋体。");
115113
Console.WriteLine(e.SliderUrl);
116114
Console.WriteLine();
117115
Console.ResetColor();
@@ -141,6 +139,8 @@ private static void OnCaptcha(Bot b, CaptchaEvent e)
141139
}
142140

143141
Console.ForegroundColor = ConsoleColor.Red;
142+
Console.WriteLine("需要滑块验证,请使用验证助手扫码验证:");
143+
Console.WriteLine("若显示错误,请将控制台的字体更换为新宋体。");
144144
Console.WriteLine("Please enter the ticket:");
145145
Console.ResetColor();
146146

0 commit comments

Comments
 (0)