Skip to content

Commit

Permalink
Merge pull request #343 from ACaiCat/master
Browse files Browse the repository at this point in the history
修复: CaiBot并行处理数据包,以防止API调用超时
  • Loading branch information
ACaiCat authored Jul 25, 2024
2 parents 1d91440 + 2b82f77 commit cd0753b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
1 change: 0 additions & 1 deletion CaiBot/MessageHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using System.Text;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using NuGet.Protocol;
using Rests;
using SixLabors.ImageSharp;
using SixLabors.ImageSharp.Formats.Png;
Expand Down
4 changes: 2 additions & 2 deletions CaiBot/Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,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, 7, 24, 2); //日期+版本号(0,1,2...)
public static readonly Version VersionNum = new(2024, 7, 25, 1); //日期+版本号(0,1,2...)
public override Version Version => VersionNum;

//插件的构造器
Expand Down Expand Up @@ -81,7 +81,7 @@ await WebSocket.ConnectAsync(new Uri("ws://api.terraria.ink:22333/bot/" + Config
string receivedData = Encoding.UTF8.GetString(buffer, 0, result.Count);
if (Terraria.Program.LaunchParameters.ContainsKey("-caidebug"))
TShock.Log.ConsoleInfo($"[CaiAPI]收到BOT数据包: {receivedData}");
await MessageHandle.HandleMessageAsync(receivedData);
MessageHandle.HandleMessageAsync(receivedData);
}
}
catch (Exception ex)
Expand Down
1 change: 1 addition & 0 deletions CaiBot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ v2024.6.19.1 支持共享服务器(Beta测试)
v2024.7.11.1 支持下载地图和下载小地图
v2024.7.24.1 优化代码、发送心跳包、修复进度显示错误
v2024.7.24.2 修复心跳包错误
v2024.7.25.1 更新: CaiBot并行处理数据包,以防止API调用超时
```

## 指令
Expand Down

0 comments on commit cd0753b

Please sign in to comment.