Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

更新: CaiBot远程指令日志记录执行群和执行者 #475

Merged
merged 6 commits into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/CaiBot/MessageHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ public static async Task HandleMessageAsync(string receivedData)
var cmd = (string) jsonObject["cmd"]!;
CaiBotPlayer tr = new();
Commands.HandleCommand(tr, cmd);
TShock.Log.ConsoleInfo($"[CaiBot][{(string)jsonObject["at"]!}]在群[{(long)jsonObject["group"]}]执行了远程命令: {(string) jsonObject["cmd"]!}");
result = new RestObject
{
{ "type", "cmd" },
Expand Down
8 changes: 2 additions & 6 deletions src/CaiBot/Plugin.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
//代码来源:https://github.com/chi-rei-den/PluginTemplate/blob/master/src/PluginTemplate/Program.cs
//恋恋的TShock插件模板,有改动(为了配合章节名)
//来自棱镜的插件教程

using Newtonsoft.Json;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System.Net;
using System.Net.WebSockets;
Expand All @@ -22,7 +18,7 @@ public class Plugin : TerrariaPlugin
public override string Author => "Cai,羽学";
public override string Description => "CaiBot机器人的适配插件";
public override string Name => "CaiBotPlugin";
public static readonly Version VersionNum = new(2024, 9, 8, 1); //日期+版本号(0,1,2...)
public static readonly Version VersionNum = new(2024, 9, 16, 1); //日期+版本号(0,1,2...)
public override Version Version => VersionNum;

//插件的构造器
Expand Down
1 change: 1 addition & 0 deletions src/CaiBot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
## 更新日志

```
v2024.9.16.1 远程指令日志记录执行群和执行者
v2024.9.8.1 新增插件列表功能
v2024.8.25.1 发送base64前用gzip压缩
v2024.8.2.1 添加被动添加BOT
Expand Down
Loading