From dd39451733d13262e3b75537a55713197edef352 Mon Sep 17 00:00:00 2001 From: Coloryr <402067010@qq.com> Date: Wed, 22 May 2024 09:48:13 +0800 Subject: [PATCH] clean --- Minecraft_QQ_Core/Config/ConfigObj.cs | 4 ++-- Minecraft_QQ_Core/Config/ConfigRead.cs | 6 +++--- Minecraft_QQ_Core/Config/ConfigSave.cs | 4 ++-- Minecraft_QQ_Core/DBMysql.cs | 10 +++++----- Minecraft_QQ_Core/Minecraft_QQ.cs | 10 +++++----- Minecraft_QQ_Core/MySocket/Message.cs | 4 ++-- Minecraft_QQ_Core/MySocket/PluginItem.cs | 6 +++--- Minecraft_QQ_Core/MySocket/PluginServer.cs | 8 ++++---- Minecraft_QQ_Core/Robot/MessageHelper.cs | 18 +++++++++--------- Minecraft_QQ_Core/Robot/RobotCore.cs | 15 ++++++--------- Minecraft_QQ_Core/Utils/Funtion.cs | 11 +++++------ Minecraft_QQ_Core/Utils/SendGroup.cs | 6 +++--- 12 files changed, 49 insertions(+), 53 deletions(-) diff --git a/Minecraft_QQ_Core/Config/ConfigObj.cs b/Minecraft_QQ_Core/Config/ConfigObj.cs index 3cf3ecb..1cec32b 100644 --- a/Minecraft_QQ_Core/Config/ConfigObj.cs +++ b/Minecraft_QQ_Core/Config/ConfigObj.cs @@ -179,14 +179,14 @@ public static AskConfig Make() { AskList = new() { - { + { "服务器菜单", $"服务器查询菜单:{Environment.NewLine}" + $"【{Minecraft_QQ.Config.Check.Head}{Minecraft_QQ.Config.Check.Bind} ID】可以绑定你的游戏ID。{Environment.NewLine}" + $"【{Minecraft_QQ.Config.Check.Head}{Minecraft_QQ.Config.Check.PlayList}】可以查询服务器在线人数。{Environment.NewLine}" + $"【{Minecraft_QQ.Config.Check.Head}{Minecraft_QQ.Config.Check.ServerCheck}】可以查询服务器是否在运行。{Environment.NewLine}" + $"【{Minecraft_QQ.Config.Check.Head}{Minecraft_QQ.Config.Check.Send} 内容】可以向服务器里发送消息。(使用前请确保已经绑定了ID,)" - } + } } }; } diff --git a/Minecraft_QQ_Core/Config/ConfigRead.cs b/Minecraft_QQ_Core/Config/ConfigRead.cs index 37e8f11..5426c67 100644 --- a/Minecraft_QQ_Core/Config/ConfigRead.cs +++ b/Minecraft_QQ_Core/Config/ConfigRead.cs @@ -1,7 +1,7 @@ -using Minecraft_QQ_Core.Utils; -using Newtonsoft.Json; -using System; +using System; using System.IO; +using Minecraft_QQ_Core.Utils; +using Newtonsoft.Json; namespace Minecraft_QQ_Core.Config; diff --git a/Minecraft_QQ_Core/Config/ConfigSave.cs b/Minecraft_QQ_Core/Config/ConfigSave.cs index 6519a7d..94c6a91 100644 --- a/Minecraft_QQ_Core/Config/ConfigSave.cs +++ b/Minecraft_QQ_Core/Config/ConfigSave.cs @@ -1,10 +1,10 @@ -using Minecraft_QQ_Core.Utils; -using Newtonsoft.Json; using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.IO; using System.Threading; +using Minecraft_QQ_Core.Utils; +using Newtonsoft.Json; namespace Minecraft_QQ_Core.Config; diff --git a/Minecraft_QQ_Core/DBMysql.cs b/Minecraft_QQ_Core/DBMysql.cs index ca608ca..37dadcf 100644 --- a/Minecraft_QQ_Core/DBMysql.cs +++ b/Minecraft_QQ_Core/DBMysql.cs @@ -1,10 +1,10 @@ -using Dapper; +using System; +using System.Linq; +using System.Threading.Tasks; +using Dapper; using Minecraft_QQ_Core.Config; using Minecraft_QQ_Core.Utils; using MySqlConnector; -using System; -using System.Linq; -using System.Threading.Tasks; namespace Minecraft_QQ_Core; @@ -175,7 +175,7 @@ private static void LoadMute() Minecraft_QQ.Players.MuteList.Add(id); } } - + } } /// diff --git a/Minecraft_QQ_Core/Minecraft_QQ.cs b/Minecraft_QQ_Core/Minecraft_QQ.cs index edcbcdb..56fb8b7 100644 --- a/Minecraft_QQ_Core/Minecraft_QQ.cs +++ b/Minecraft_QQ_Core/Minecraft_QQ.cs @@ -1,12 +1,12 @@ -using Minecraft_QQ_Core.Config; +using System; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using Minecraft_QQ_Core.Config; using Minecraft_QQ_Core.MySocket; using Minecraft_QQ_Core.Robot; using Minecraft_QQ_Core.Utils; using OneBotSharp.Objs.Message; -using System; -using System.IO; -using System.Linq; -using System.Threading.Tasks; namespace Minecraft_QQ_Core; diff --git a/Minecraft_QQ_Core/MySocket/Message.cs b/Minecraft_QQ_Core/MySocket/Message.cs index 9adb4b0..43f9e26 100644 --- a/Minecraft_QQ_Core/MySocket/Message.cs +++ b/Minecraft_QQ_Core/MySocket/Message.cs @@ -1,6 +1,6 @@ -using DotNetty.Buffers; +using System.Text; +using DotNetty.Buffers; using Minecraft_QQ_Core.Utils; -using System.Text; namespace Minecraft_QQ_Core.MySocket; diff --git a/Minecraft_QQ_Core/MySocket/PluginItem.cs b/Minecraft_QQ_Core/MySocket/PluginItem.cs index f871cd8..340f567 100644 --- a/Minecraft_QQ_Core/MySocket/PluginItem.cs +++ b/Minecraft_QQ_Core/MySocket/PluginItem.cs @@ -1,10 +1,10 @@ -using DotNetty.Buffers; +using System; +using System.Threading.Tasks; +using DotNetty.Buffers; using DotNetty.Transport.Channels; using Minecraft_QQ_Core.Robot; using Minecraft_QQ_Core.Utils; using OneBotSharp.Objs.Message; -using System; -using System.Threading.Tasks; namespace Minecraft_QQ_Core.MySocket; diff --git a/Minecraft_QQ_Core/MySocket/PluginServer.cs b/Minecraft_QQ_Core/MySocket/PluginServer.cs index 829846a..e3cdc58 100644 --- a/Minecraft_QQ_Core/MySocket/PluginServer.cs +++ b/Minecraft_QQ_Core/MySocket/PluginServer.cs @@ -1,4 +1,7 @@ -using DotNetty.Buffers; +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using DotNetty.Buffers; using DotNetty.Codecs; using DotNetty.Handlers.Logging; using DotNetty.Transport.Bootstrapping; @@ -7,9 +10,6 @@ using Minecraft_QQ_Core.Robot; using Minecraft_QQ_Core.Utils; using OneBotSharp.Objs.Message; -using System; -using System.Collections.Concurrent; -using System.Collections.Generic; namespace Minecraft_QQ_Core.MySocket; diff --git a/Minecraft_QQ_Core/Robot/MessageHelper.cs b/Minecraft_QQ_Core/Robot/MessageHelper.cs index 1982550..863526a 100644 --- a/Minecraft_QQ_Core/Robot/MessageHelper.cs +++ b/Minecraft_QQ_Core/Robot/MessageHelper.cs @@ -1,10 +1,10 @@ -using Minecraft_QQ_Core.Config; +using System; +using System.Collections.Generic; +using System.Text; +using Minecraft_QQ_Core.Config; using Minecraft_QQ_Core.MySocket; using Minecraft_QQ_Core.Utils; using OneBotSharp.Objs.Message; -using System; -using System.Collections.Generic; -using System.Text; namespace Minecraft_QQ_Core.Robot; @@ -411,7 +411,7 @@ private static bool SendCommand(long fromGroup, List msg, long fromQQ) } else if (item1 == "{arg:next}") { - if (nowlist == null || index3 >= nowlist.Length ) + if (nowlist == null || index3 >= nowlist.Length) { index1++; if (index1 >= msg.Count || msg[index1] is not MsgText text1) @@ -550,7 +550,7 @@ public static void GroupMessage(long fromGroup, long fromQQ, string raw, List