Skip to content

Commit

Permalink
细节优化
Browse files Browse the repository at this point in the history
  • Loading branch information
TimeRainStarSky committed Oct 29, 2024
1 parent 9094863 commit 0c56cf7
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions plugins/adapter/OneBotv11.js
Original file line number Diff line number Diff line change
Expand Up @@ -849,6 +849,14 @@ Bot.adapter.push(new class OneBotv11Adapter {
break
case "group_upload":
Bot.makeLog("info", `群文件上传:${Bot.String(data.file)}`, `${data.self_id} <= ${data.group_id}, ${data.user_id}`, true)
Bot.em("message.group.normal", {
...data,
post_type: "message",
message_type: "group",
sub_type: "normal",
message: [{ ...data.file, type: "file" }],
raw_message: `[文件:${data.file.name}]`,
})
break
case "group_ban":
Bot.makeLog("info", `群禁言:${data.operator_id} => ${data.user_id} ${data.sub_type} ${data.duration}秒`, `${data.self_id} <= ${data.group_id}`, true)
Expand Down Expand Up @@ -885,6 +893,14 @@ Bot.adapter.push(new class OneBotv11Adapter {
break
case "offline_file":
Bot.makeLog("info", `离线文件:${Bot.String(data.file)}`, `${data.self_id} <= ${data.user_id}`, true)
Bot.em("message.private.friend", {
...data,
post_type: "message",
message_type: "private",
sub_type: "friend",
message: [{ ...data.file, type: "file" }],
raw_message: `[文件:${data.file.name}]`,
})
break
case "client_status":
Bot.makeLog("info", `客户端${data.online ? "上线" : "下线"}${Bot.String(data.client)}`, data.self_id)
Expand Down

0 comments on commit 0c56cf7

Please sign in to comment.