Skip to content
This repository has been archived by the owner on Jun 23, 2023. It is now read-only.

Commit

Permalink
增加撤回日志
Browse files Browse the repository at this point in the history
  • Loading branch information
Hellobaka committed Apr 20, 2021
1 parent 7d5a611 commit ca05051
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion Launcher/Forms/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -491,9 +491,22 @@ private static void OnEventsHandler(string fn)
Save.TryCount++;
logMsg = $"与服务器连接断开,第 {Save.TryCount} 次尝试重连";
break;
case "ON_EVENT_GROUP_REVOKE":
long GroupID, QQID, MsgID;
GroupID = Convert.ToInt64(events["CurrentPacket"]["Data"]["EventData"]["GroupID"].ToString());
QQID = Convert.ToInt64(events["CurrentPacket"]["Data"]["EventData"]["UserID"].ToString());
MsgID = Convert.ToInt64(events["CurrentPacket"]["Data"]["EventData"]["MsgSeq"].ToString());
string msg = Save.MsgList.Find(x => x.MsgId == MsgID)?.text;
if (string.IsNullOrWhiteSpace(msg))
{
logMsg = $"群 {GroupID} 成员 {QQID} 撤回了一条消息,消息ID:{MsgID},消息内容捕获失败";
break;
}
logMsg = $"群 {GroupID} 成员 {QQID} 撤回了一条消息,消息ID:{MsgID},内容:{msg}";
break;
}
sw.Stop();
string updatemsg = $"√ {sw.ElapsedMilliseconds / (double)1000:f2} ms";
string updatemsg = $"√ {sw.ElapsedMilliseconds / (double)1000:f2} s";
if (pluginid > 0)
{
updatemsg += $"(由 {pluginManagment.Plugins[pluginid - 1].appinfo.Name} 结束消息处理)";
Expand Down

0 comments on commit ca05051

Please sign in to comment.