代码清理
This commit is contained in:
parent
1582fb0eb3
commit
45ad0e3b47
@ -127,21 +127,21 @@ namespace Milimoe.RainBOT.ListeningTask
|
|||||||
_ = OshimaController.Instance.SCList(e.group_id, e.user_id);
|
_ = OshimaController.Instance.SCList(e.group_id, e.user_id);
|
||||||
return quick_reply;
|
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;
|
||||||
_ = OshimaController.Instance.SCList(e.group_id, e.user_id, true);
|
_ = OshimaController.Instance.SCList(e.group_id, e.user_id, true);
|
||||||
return quick_reply;
|
return quick_reply;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.detail.Contains("圣人点数") || e.detail == "查询sc" || e.detail == "sc查询")
|
if (e.detail.Contains("圣人点数") || e.detail == "查询sc" || e.detail == "sc查询")
|
||||||
{
|
{
|
||||||
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;
|
||||||
_ = OshimaController.Instance.SCRecord(e.group_id, e.user_id);
|
_ = OshimaController.Instance.SCRecord(e.group_id, e.user_id);
|
||||||
return quick_reply;
|
return quick_reply;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.detail == "查询服务器启动时间")
|
if (e.detail == "查询服务器启动时间")
|
||||||
{
|
{
|
||||||
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;
|
||||||
@ -152,7 +152,7 @@ namespace Milimoe.RainBOT.ListeningTask
|
|||||||
}
|
}
|
||||||
return quick_reply;
|
return quick_reply;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.detail.StartsWith("查询任务计划"))
|
if (e.detail.StartsWith("查询任务计划"))
|
||||||
{
|
{
|
||||||
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;
|
||||||
|
|||||||
@ -7,7 +7,6 @@ using Milimoe.OneBot.Framework.Utility;
|
|||||||
using Milimoe.OneBot.Model.Content;
|
using Milimoe.OneBot.Model.Content;
|
||||||
using Milimoe.OneBot.Model.Message;
|
using Milimoe.OneBot.Model.Message;
|
||||||
using Milimoe.OneBot.Model.Other;
|
using Milimoe.OneBot.Model.Other;
|
||||||
using Milimoe.OneBot.Utility;
|
|
||||||
using Milimoe.RainBOT.Command;
|
using Milimoe.RainBOT.Command;
|
||||||
using Group = Milimoe.OneBot.Model.Other.Group;
|
using Group = Milimoe.OneBot.Model.Other.Group;
|
||||||
|
|
||||||
@ -165,7 +164,7 @@ namespace Milimoe.RainBOT.Settings
|
|||||||
}
|
}
|
||||||
await SendMessage(SupportedAPI.send_group_msg, group_id, function, content, true);
|
await SendMessage(SupportedAPI.send_group_msg, group_id, function, content, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static async Task SendGroupMessageAt(long at_id, long group_id, string function, string text, int delay = 0)
|
public static async Task SendGroupMessageAt(long at_id, long group_id, string function, string text, int delay = 0)
|
||||||
{
|
{
|
||||||
GroupMessageContent content = new(group_id);
|
GroupMessageContent content = new(group_id);
|
||||||
@ -190,7 +189,7 @@ namespace Milimoe.RainBOT.Settings
|
|||||||
}
|
}
|
||||||
await SendMessage(SupportedAPI.send_group_msg, group_id, function, content, true);
|
await SendMessage(SupportedAPI.send_group_msg, group_id, function, content, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static async Task SendGroupMessage(long group_id, string function, IEnumerable<IContent> contents) => await SendMessage(SupportedAPI.send_group_msg, group_id, function, contents, true);
|
public static async Task SendGroupMessage(long group_id, string function, IEnumerable<IContent> contents) => await SendMessage(SupportedAPI.send_group_msg, group_id, function, contents, true);
|
||||||
|
|
||||||
public static async Task SendFriendMessage(long user_id, string function, string text)
|
public static async Task SendFriendMessage(long user_id, string function, string text)
|
||||||
@ -354,7 +353,7 @@ namespace Milimoe.RainBOT.Settings
|
|||||||
T? result = JsonSerializer.Deserialize<T>(content);
|
T? result = JsonSerializer.Deserialize<T>(content);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static async Task<T?> HttpPost<T>(string url, string json = "", bool fungame = false)
|
public static async Task<T?> HttpPost<T>(string url, string json = "", bool fungame = false)
|
||||||
{
|
{
|
||||||
HttpContent content = new StringContent(json, Encoding.UTF8, "application/json");
|
HttpContent content = new StringContent(json, Encoding.UTF8, "application/json");
|
||||||
|
|||||||
@ -35,13 +35,13 @@ namespace Milimoe.RainBOT.Settings
|
|||||||
public static bool IsCallBrother { get; set; } = true;
|
public static bool IsCallBrother { get; set; } = true;
|
||||||
|
|
||||||
public static long PCallBrother { get; set; } = 4;
|
public static long PCallBrother { get; set; } = 4;
|
||||||
|
|
||||||
public static bool IsAI { get; set; } = true;
|
public static bool IsAI { get; set; } = true;
|
||||||
|
|
||||||
public static long PAI { get; set; } = 100;
|
public static long PAI { get; set; } = 100;
|
||||||
|
|
||||||
public static bool IsDebug { get; set; } = false;
|
public static bool IsDebug { get; set; } = false;
|
||||||
|
|
||||||
public static bool IsQQBot { get; set; } = false;
|
public static bool IsQQBot { get; set; } = false;
|
||||||
|
|
||||||
public static long DebugGroupID { get; set; } = 0;
|
public static long DebugGroupID { get; set; } = 0;
|
||||||
@ -59,15 +59,15 @@ namespace Milimoe.RainBOT.Settings
|
|||||||
public static List<long> SayNoAccessGroup { get; set; } = [];
|
public static List<long> SayNoAccessGroup { get; set; } = [];
|
||||||
|
|
||||||
public static List<long> OSMCoreGroup { get; set; } = [];
|
public static List<long> OSMCoreGroup { get; set; } = [];
|
||||||
|
|
||||||
public static List<long> FunGameGroup { get; set; } = [];
|
public static List<long> FunGameGroup { get; set; } = [];
|
||||||
|
|
||||||
public static List<long> FunGameWebSocketGroup { get; set; } = [];
|
public static List<long> FunGameWebSocketGroup { get; set; } = [];
|
||||||
|
|
||||||
public static string FunGameServer { get; set; } = "";
|
public static string FunGameServer { get; set; } = "";
|
||||||
|
|
||||||
public static string FunGameToken { get; set; } = "";
|
public static string FunGameToken { get; set; } = "";
|
||||||
|
|
||||||
public static string AIAPIToken { get; set; } = "";
|
public static string AIAPIToken { get; set; } = "";
|
||||||
|
|
||||||
public static PluginConfig Configs { get; set; } = new("rainbot", "config");
|
public static PluginConfig Configs { get; set; } = new("rainbot", "config");
|
||||||
|
|||||||
@ -16,7 +16,7 @@ namespace Milimoe.RainBOT.Settings
|
|||||||
public static List<long> RepeatQQIgnore { get; set; } = [];
|
public static List<long> RepeatQQIgnore { get; set; } = [];
|
||||||
|
|
||||||
public static List<long> ReverseAtIgnore { get; set; } = [];
|
public static List<long> ReverseAtIgnore { get; set; } = [];
|
||||||
|
|
||||||
public static HashSet<string> CustomIgnore { get; set; } = [];
|
public static HashSet<string> CustomIgnore { get; set; } = [];
|
||||||
|
|
||||||
public static PluginConfig Configs { get; set; } = new("rainbot", "ignore");
|
public static PluginConfig Configs { get; set; } = new("rainbot", "ignore");
|
||||||
@ -122,7 +122,7 @@ namespace Milimoe.RainBOT.Settings
|
|||||||
switch (group.ToLower())
|
switch (group.ToLower())
|
||||||
{
|
{
|
||||||
case "repeatignore":
|
case "repeatignore":
|
||||||
list = [..RepeatIgnore];
|
list = [.. RepeatIgnore];
|
||||||
break;
|
break;
|
||||||
case "callbrotherqqignore":
|
case "callbrotherqqignore":
|
||||||
list = CallBrotherQQIgnore.Select(x => x.ToString()).ToList();
|
list = CallBrotherQQIgnore.Select(x => x.ToString()).ToList();
|
||||||
|
|||||||
@ -5,10 +5,10 @@ namespace Milimoe.RainBOT.Settings
|
|||||||
{
|
{
|
||||||
public class OSMCore
|
public class OSMCore
|
||||||
{
|
{
|
||||||
public const string version = "v1.0";
|
public const string version = "v1.1";
|
||||||
public const string version2 = "Patch12 V1";
|
public const string version2 = "Beta1";
|
||||||
|
|
||||||
public static string Info => $"OSM Core {version} {version2}\r\nAuthor: Milimoe\r\nBuilt on {GetBuiltTime(Assembly.GetExecutingAssembly().Location)}\r\nSee: https://github.com/milimoe";
|
public static string Info => $"OSM Core {version} {version2}\r\nAuthor: Milimoe\r\nBuilt at {GetBuiltTime(Assembly.GetExecutingAssembly().Location)}\r\nSee: https://github.com/milimoe";
|
||||||
|
|
||||||
public static string GetBuiltTime(string dll_name)
|
public static string GetBuiltTime(string dll_name)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -122,7 +122,7 @@ namespace Milimoe.RainBOT.Settings
|
|||||||
catch { }
|
catch { }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task ConnectToAnonymousServer()
|
public async Task ConnectToAnonymousServer()
|
||||||
{
|
{
|
||||||
if (HTTPClient != null)
|
if (HTTPClient != null)
|
||||||
@ -132,7 +132,7 @@ namespace Milimoe.RainBOT.Settings
|
|||||||
await HTTPClient.Send(SocketMessageType.AnonymousGameServer, ServerName, data);
|
await HTTPClient.Send(SocketMessageType.AnonymousGameServer, ServerName, data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task DisconnectFromAnonymousServer()
|
public async Task DisconnectFromAnonymousServer()
|
||||||
{
|
{
|
||||||
if (HTTPClient != null)
|
if (HTTPClient != null)
|
||||||
@ -140,7 +140,7 @@ namespace Milimoe.RainBOT.Settings
|
|||||||
await HTTPClient.Send(SocketMessageType.EndGame);
|
await HTTPClient.Send(SocketMessageType.EndGame);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task DisconnectAsync()
|
public async Task DisconnectAsync()
|
||||||
{
|
{
|
||||||
if (HTTPClient != null)
|
if (HTTPClient != null)
|
||||||
|
|||||||
@ -84,7 +84,7 @@ namespace Milimoe.RainBOT.Settings
|
|||||||
32、决斗/完整决斗 <@对方>/<QQ号>/<昵称>:和对方切磋
|
32、决斗/完整决斗 <@对方>/<QQ号>/<昵称>:和对方切磋
|
||||||
发送【帮助4】查看第 4 页");
|
发送【帮助4】查看第 4 页");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.detail == "帮助4")
|
if (e.detail == "帮助4")
|
||||||
{
|
{
|
||||||
await Bot.SendGroupMessage(e.group_id, "饭给木", @"《饭给木》游戏指令列表(第 4 / 5 页)
|
await Bot.SendGroupMessage(e.group_id, "饭给木", @"《饭给木》游戏指令列表(第 4 / 5 页)
|
||||||
@ -100,7 +100,7 @@ namespace Milimoe.RainBOT.Settings
|
|||||||
42、签到:每日签到
|
42、签到:每日签到
|
||||||
发送【帮助5】查看第 5 页");
|
发送【帮助5】查看第 5 页");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.detail == "帮助5")
|
if (e.detail == "帮助5")
|
||||||
{
|
{
|
||||||
await Bot.SendGroupMessage(e.group_id, "饭给木", @"《饭给木》游戏指令列表(第 5 / 5 页)
|
await Bot.SendGroupMessage(e.group_id, "饭给木", @"《饭给木》游戏指令列表(第 5 / 5 页)
|
||||||
@ -381,7 +381,7 @@ namespace Milimoe.RainBOT.Settings
|
|||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.detail == "我的存档")
|
if (e.detail == "我的存档")
|
||||||
{
|
{
|
||||||
string msg = (await Bot.HttpPost<string>($"https://{GeneralSettings.FunGameServer}/fungame/showsaved?uid={e.user_id}", "", fungame: true) ?? "").Trim();
|
string msg = (await Bot.HttpPost<string>($"https://{GeneralSettings.FunGameServer}/fungame/showsaved?uid={e.user_id}", "", fungame: true) ?? "").Trim();
|
||||||
@ -391,7 +391,7 @@ namespace Milimoe.RainBOT.Settings
|
|||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.detail == "我的主战")
|
if (e.detail == "我的主战")
|
||||||
{
|
{
|
||||||
string msg = (await Bot.HttpPost<string>($"https://{GeneralSettings.FunGameServer}/fungame/showcharacterinfo?uid={e.user_id}&seq=0", "", fungame: true) ?? "").Trim();
|
string msg = (await Bot.HttpPost<string>($"https://{GeneralSettings.FunGameServer}/fungame/showcharacterinfo?uid={e.user_id}&seq=0", "", fungame: true) ?? "").Trim();
|
||||||
@ -401,7 +401,7 @@ namespace Milimoe.RainBOT.Settings
|
|||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.detail == "我的状态")
|
if (e.detail == "我的状态")
|
||||||
{
|
{
|
||||||
string msg = (await Bot.HttpPost<string>($"https://{GeneralSettings.FunGameServer}/fungame/showmaincharacterorsquadstatus?uid={e.user_id}", "", fungame: true) ?? "").Trim();
|
string msg = (await Bot.HttpPost<string>($"https://{GeneralSettings.FunGameServer}/fungame/showmaincharacterorsquadstatus?uid={e.user_id}", "", fungame: true) ?? "").Trim();
|
||||||
@ -411,7 +411,7 @@ namespace Milimoe.RainBOT.Settings
|
|||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.detail == "小队状态" || e.detail == "我的小队状态")
|
if (e.detail == "小队状态" || e.detail == "我的小队状态")
|
||||||
{
|
{
|
||||||
string msg = (await Bot.HttpPost<string>($"https://{GeneralSettings.FunGameServer}/fungame/showmaincharacterorsquadstatus?uid={e.user_id}&squad=true", "", fungame: true) ?? "").Trim();
|
string msg = (await Bot.HttpPost<string>($"https://{GeneralSettings.FunGameServer}/fungame/showmaincharacterorsquadstatus?uid={e.user_id}&squad=true", "", fungame: true) ?? "").Trim();
|
||||||
@ -421,7 +421,7 @@ namespace Milimoe.RainBOT.Settings
|
|||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.detail == "我的小队")
|
if (e.detail == "我的小队")
|
||||||
{
|
{
|
||||||
string msg = (await Bot.HttpPost<string>($"https://{GeneralSettings.FunGameServer}/fungame/showsquad?uid={e.user_id}", "", fungame: true) ?? "").Trim();
|
string msg = (await Bot.HttpPost<string>($"https://{GeneralSettings.FunGameServer}/fungame/showsquad?uid={e.user_id}", "", fungame: true) ?? "").Trim();
|
||||||
@ -431,7 +431,7 @@ namespace Milimoe.RainBOT.Settings
|
|||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.detail == "清空小队")
|
if (e.detail == "清空小队")
|
||||||
{
|
{
|
||||||
string msg = (await Bot.HttpPost<string>($"https://{GeneralSettings.FunGameServer}/fungame/clearsquad?uid={e.user_id}", "", fungame: true) ?? "").Trim();
|
string msg = (await Bot.HttpPost<string>($"https://{GeneralSettings.FunGameServer}/fungame/clearsquad?uid={e.user_id}", "", fungame: true) ?? "").Trim();
|
||||||
@ -673,7 +673,7 @@ namespace Milimoe.RainBOT.Settings
|
|||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.detail.Length >= 4 && e.detail[..4].Equals("角色技能", StringComparison.CurrentCultureIgnoreCase))
|
if (e.detail.Length >= 4 && e.detail[..4].Equals("角色技能", StringComparison.CurrentCultureIgnoreCase))
|
||||||
{
|
{
|
||||||
string detail = e.detail.Replace("角色技能", "").Trim();
|
string detail = e.detail.Replace("角色技能", "").Trim();
|
||||||
@ -692,7 +692,7 @@ namespace Milimoe.RainBOT.Settings
|
|||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.detail.Length >= 4 && e.detail[..4].Equals("角色物品", StringComparison.CurrentCultureIgnoreCase))
|
if (e.detail.Length >= 4 && e.detail[..4].Equals("角色物品", StringComparison.CurrentCultureIgnoreCase))
|
||||||
{
|
{
|
||||||
string detail = e.detail.Replace("角色物品", "").Trim();
|
string detail = e.detail.Replace("角色物品", "").Trim();
|
||||||
@ -779,7 +779,7 @@ namespace Milimoe.RainBOT.Settings
|
|||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.detail == "任务列表")
|
if (e.detail == "任务列表")
|
||||||
{
|
{
|
||||||
string msg = (await Bot.HttpPost<string>($"https://{GeneralSettings.FunGameServer}/fungame/checkquestlist?uid={e.user_id}", "", fungame: true) ?? "").Trim();
|
string msg = (await Bot.HttpPost<string>($"https://{GeneralSettings.FunGameServer}/fungame/checkquestlist?uid={e.user_id}", "", fungame: true) ?? "").Trim();
|
||||||
@ -789,7 +789,7 @@ namespace Milimoe.RainBOT.Settings
|
|||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.detail == "任务信息")
|
if (e.detail == "任务信息")
|
||||||
{
|
{
|
||||||
string msg = (await Bot.HttpPost<string>($"https://{GeneralSettings.FunGameServer}/fungame/checkworkingquest?uid={e.user_id}", "", fungame: true) ?? "").Trim();
|
string msg = (await Bot.HttpPost<string>($"https://{GeneralSettings.FunGameServer}/fungame/checkworkingquest?uid={e.user_id}", "", fungame: true) ?? "").Trim();
|
||||||
@ -799,7 +799,7 @@ namespace Milimoe.RainBOT.Settings
|
|||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.detail == "任务结算")
|
if (e.detail == "任务结算")
|
||||||
{
|
{
|
||||||
string msg = (await Bot.HttpPost<string>($"https://{GeneralSettings.FunGameServer}/fungame/settlequest?uid={e.user_id}", "", fungame: true) ?? "").Trim();
|
string msg = (await Bot.HttpPost<string>($"https://{GeneralSettings.FunGameServer}/fungame/settlequest?uid={e.user_id}", "", fungame: true) ?? "").Trim();
|
||||||
@ -809,7 +809,7 @@ namespace Milimoe.RainBOT.Settings
|
|||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.detail == "签到")
|
if (e.detail == "签到")
|
||||||
{
|
{
|
||||||
string msg = (await Bot.HttpPost<string>($"https://{GeneralSettings.FunGameServer}/fungame/signin?uid={e.user_id}", "", fungame: true) ?? "").Trim();
|
string msg = (await Bot.HttpPost<string>($"https://{GeneralSettings.FunGameServer}/fungame/signin?uid={e.user_id}", "", fungame: true) ?? "").Trim();
|
||||||
@ -819,7 +819,7 @@ namespace Milimoe.RainBOT.Settings
|
|||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.detail.Length >= 4 && e.detail[..4].Equals("开始任务", StringComparison.CurrentCultureIgnoreCase))
|
if (e.detail.Length >= 4 && e.detail[..4].Equals("开始任务", StringComparison.CurrentCultureIgnoreCase))
|
||||||
{
|
{
|
||||||
string detail = e.detail.Replace("开始任务", "").Trim();
|
string detail = e.detail.Replace("开始任务", "").Trim();
|
||||||
@ -833,7 +833,7 @@ namespace Milimoe.RainBOT.Settings
|
|||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.detail.Length >= 4 && e.detail[..4].Equals("我的物品", StringComparison.CurrentCultureIgnoreCase))
|
if (e.detail.Length >= 4 && e.detail[..4].Equals("我的物品", StringComparison.CurrentCultureIgnoreCase))
|
||||||
{
|
{
|
||||||
string detail = e.detail.Replace("我的物品", "").Trim();
|
string detail = e.detail.Replace("我的物品", "").Trim();
|
||||||
@ -1337,7 +1337,7 @@ namespace Milimoe.RainBOT.Settings
|
|||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.detail.Length >= 4 && e.detail[..4].Equals("小队决斗", StringComparison.CurrentCultureIgnoreCase))
|
if (e.detail.Length >= 4 && e.detail[..4].Equals("小队决斗", StringComparison.CurrentCultureIgnoreCase))
|
||||||
{
|
{
|
||||||
string detail = e.detail.Replace("小队决斗", "").Replace("@", "").Trim();
|
string detail = e.detail.Replace("小队决斗", "").Replace("@", "").Trim();
|
||||||
@ -1410,7 +1410,7 @@ namespace Milimoe.RainBOT.Settings
|
|||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.detail.Length >= 8 && e.detail[..8].Equals("小队讨伐boss", StringComparison.CurrentCultureIgnoreCase))
|
if (e.detail.Length >= 8 && e.detail[..8].Equals("小队讨伐boss", StringComparison.CurrentCultureIgnoreCase))
|
||||||
{
|
{
|
||||||
string detail = e.detail.Replace("小队讨伐boss", "").Trim();
|
string detail = e.detail.Replace("小队讨伐boss", "").Trim();
|
||||||
@ -1464,7 +1464,7 @@ namespace Milimoe.RainBOT.Settings
|
|||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.detail.Length >= 6 && e.detail[..6].Equals("讨伐boss", StringComparison.CurrentCultureIgnoreCase))
|
if (e.detail.Length >= 6 && e.detail[..6].Equals("讨伐boss", StringComparison.CurrentCultureIgnoreCase))
|
||||||
{
|
{
|
||||||
string detail = e.detail.Replace("讨伐boss", "").Trim();
|
string detail = e.detail.Replace("讨伐boss", "").Trim();
|
||||||
@ -1532,7 +1532,7 @@ namespace Milimoe.RainBOT.Settings
|
|||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.detail.Length >= 4 && e.detail[..4].Equals("小队移除", StringComparison.CurrentCultureIgnoreCase))
|
if (e.detail.Length >= 4 && e.detail[..4].Equals("小队移除", StringComparison.CurrentCultureIgnoreCase))
|
||||||
{
|
{
|
||||||
string detail = e.detail.Replace("小队移除", "").Trim();
|
string detail = e.detail.Replace("小队移除", "").Trim();
|
||||||
@ -1546,7 +1546,7 @@ namespace Milimoe.RainBOT.Settings
|
|||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.detail.Length >= 4 && (e.detail.StartsWith("设置小队") || e.detail.StartsWith("重组小队")))
|
if (e.detail.Length >= 4 && (e.detail.StartsWith("设置小队") || e.detail.StartsWith("重组小队")))
|
||||||
{
|
{
|
||||||
string detail = e.detail.Replace("设置小队", "").Replace("重组小队", "").Trim();
|
string detail = e.detail.Replace("设置小队", "").Replace("重组小队", "").Trim();
|
||||||
@ -1580,7 +1580,7 @@ namespace Milimoe.RainBOT.Settings
|
|||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.detail.Length >= 4 && e.detail[..4].Equals("创建社团", StringComparison.CurrentCultureIgnoreCase))
|
if (e.detail.Length >= 4 && e.detail[..4].Equals("创建社团", StringComparison.CurrentCultureIgnoreCase))
|
||||||
{
|
{
|
||||||
string detail = e.detail.Replace("创建社团", "").Trim();
|
string detail = e.detail.Replace("创建社团", "").Trim();
|
||||||
@ -1607,7 +1607,7 @@ namespace Milimoe.RainBOT.Settings
|
|||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.detail == "我的社团")
|
if (e.detail == "我的社团")
|
||||||
{
|
{
|
||||||
string msg = (await Bot.HttpPost<string>($"https://{GeneralSettings.FunGameServer}/fungame/showclubinfo?uid={e.user_id}", "", fungame: true) ?? "").Trim();
|
string msg = (await Bot.HttpPost<string>($"https://{GeneralSettings.FunGameServer}/fungame/showclubinfo?uid={e.user_id}", "", fungame: true) ?? "").Trim();
|
||||||
@ -1627,7 +1627,7 @@ namespace Milimoe.RainBOT.Settings
|
|||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.detail == "查看社团成员")
|
if (e.detail == "查看社团成员")
|
||||||
{
|
{
|
||||||
string msg = (await Bot.HttpPost<string>($"https://{GeneralSettings.FunGameServer}/fungame/showclubmemberlist?uid={e.user_id}&type=0", "", fungame: true) ?? "").Trim();
|
string msg = (await Bot.HttpPost<string>($"https://{GeneralSettings.FunGameServer}/fungame/showclubmemberlist?uid={e.user_id}&type=0", "", fungame: true) ?? "").Trim();
|
||||||
@ -1637,7 +1637,7 @@ namespace Milimoe.RainBOT.Settings
|
|||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.detail == "查看社团管理")
|
if (e.detail == "查看社团管理")
|
||||||
{
|
{
|
||||||
string msg = (await Bot.HttpPost<string>($"https://{GeneralSettings.FunGameServer}/fungame/showclubmemberlist?uid={e.user_id}&type=1", "", fungame: true) ?? "").Trim();
|
string msg = (await Bot.HttpPost<string>($"https://{GeneralSettings.FunGameServer}/fungame/showclubmemberlist?uid={e.user_id}&type=1", "", fungame: true) ?? "").Trim();
|
||||||
@ -1647,7 +1647,7 @@ namespace Milimoe.RainBOT.Settings
|
|||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.detail == "查看申请人列表")
|
if (e.detail == "查看申请人列表")
|
||||||
{
|
{
|
||||||
string msg = (await Bot.HttpPost<string>($"https://{GeneralSettings.FunGameServer}/fungame/showclubmemberlist?uid={e.user_id}&type=2", "", fungame: true) ?? "").Trim();
|
string msg = (await Bot.HttpPost<string>($"https://{GeneralSettings.FunGameServer}/fungame/showclubmemberlist?uid={e.user_id}&type=2", "", fungame: true) ?? "").Trim();
|
||||||
@ -1671,7 +1671,7 @@ namespace Milimoe.RainBOT.Settings
|
|||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.detail.Length >= 4 && e.detail[..4].Equals("社团拒绝", StringComparison.CurrentCultureIgnoreCase))
|
if (e.detail.Length >= 4 && e.detail[..4].Equals("社团拒绝", StringComparison.CurrentCultureIgnoreCase))
|
||||||
{
|
{
|
||||||
string detail = e.detail.Replace("社团拒绝", "").Replace("@", "").Trim();
|
string detail = e.detail.Replace("社团拒绝", "").Replace("@", "").Trim();
|
||||||
@ -1685,7 +1685,7 @@ namespace Milimoe.RainBOT.Settings
|
|||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.detail.Length >= 4 && e.detail[..4].Equals("社团踢出", StringComparison.CurrentCultureIgnoreCase))
|
if (e.detail.Length >= 4 && e.detail[..4].Equals("社团踢出", StringComparison.CurrentCultureIgnoreCase))
|
||||||
{
|
{
|
||||||
string detail = e.detail.Replace("社团踢出", "").Replace("@", "").Trim();
|
string detail = e.detail.Replace("社团踢出", "").Replace("@", "").Trim();
|
||||||
@ -1699,7 +1699,7 @@ namespace Milimoe.RainBOT.Settings
|
|||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.detail.Length >= 4 && e.detail[..4].Equals("社团设置", StringComparison.CurrentCultureIgnoreCase))
|
if (e.detail.Length >= 4 && e.detail[..4].Equals("社团设置", StringComparison.CurrentCultureIgnoreCase))
|
||||||
{
|
{
|
||||||
string detail = e.detail.Replace("社团设置", "").Trim();
|
string detail = e.detail.Replace("社团设置", "").Trim();
|
||||||
|
|||||||
@ -232,7 +232,7 @@ namespace Milimoe.RainBOT.Settings
|
|||||||
string msg;
|
string msg;
|
||||||
if (islist)
|
if (islist)
|
||||||
{
|
{
|
||||||
msg = list.Count > 0 ? "列表" + part + "拥有以下成员:" + "\r\n"+ string.Join("\r\n", list) : "此列表不存在或没有任何成员。";
|
msg = list.Count > 0 ? "列表" + part + "拥有以下成员:" + "\r\n" + string.Join("\r\n", list) : "此列表不存在或没有任何成员。";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user