koishi-plugin-bind-bot 2.1.7 → 2.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -85,7 +85,7 @@ class GroupRequestReviewHandler extends base_handler_1.BaseHandler {
85
85
  status: 'pending'
86
86
  };
87
87
  this.pendingRequests.set(broadcastMsgId, pendingReq);
88
- this.logger.info('入群审批', `已保存待审批记录 - 申请人: ${normalizedUserId}, 播报消息ID: ${broadcastMsgId}`, true);
88
+ this.logger.info('入群审批', `[DEBUG] 已保存待审批记录 - 申请人: ${normalizedUserId}, 播报消息ID: ${broadcastMsgId}, 目标群: ${this.reviewConfig.reviewGroupId}`, true);
89
89
  // 自动添加表情回应选项
90
90
  await this.addReactionOptions(broadcastMsgId, session.bot);
91
91
  }
@@ -98,12 +98,23 @@ class GroupRequestReviewHandler extends base_handler_1.BaseHandler {
98
98
  */
99
99
  async handleNotice(session) {
100
100
  try {
101
+ // 【调试】最早期日志 - 记录所有收到的notice事件
102
+ this.logger.info('入群审批', `[DEBUG] 收到notice事件 - type: ${session.type}, subtype: ${session.subtype}, guildId: ${session.guildId}`, true);
101
103
  // 只处理群表情回应事件
102
104
  if (session.subtype !== 'group-msg-emoji-like') {
103
105
  return;
104
106
  }
105
107
  // 获取原始事件数据(直接访问 session.onebot,参考luckydraw实现)
106
108
  const data = session.onebot;
109
+ // 【调试】输出完整的原始事件数据
110
+ this.logger.info('入群审批', `[DEBUG] 表情回应原始数据: ${JSON.stringify({
111
+ session_guildId: session.guildId,
112
+ session_channelId: session.channelId,
113
+ onebot_group_id: data?.group_id,
114
+ onebot_message_id: data?.message_id,
115
+ onebot_user_id: data?.user_id,
116
+ onebot_likes: data?.likes
117
+ })}`, true);
107
118
  const messageId = data?.message_id;
108
119
  const userId = data?.user_id?.toString();
109
120
  const likes = data?.likes || [];
@@ -117,6 +128,8 @@ class GroupRequestReviewHandler extends base_handler_1.BaseHandler {
117
128
  // 检查是否是待审批的消息
118
129
  const pendingReq = this.pendingRequests.get(msgId);
119
130
  if (!pendingReq) {
131
+ this.logger.info('入群审批', `[DEBUG] 消息${msgId}不在待审批列表中`, true);
132
+ this.logger.info('入群审批', `[DEBUG] 当前待审批消息ID列表: [${Array.from(this.pendingRequests.keys()).join(', ')}]`, true);
120
133
  return;
121
134
  }
122
135
  // 检查是否已处理
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-bind-bot",
3
3
  "description": "[WittF自用] BIND-BOT - 账号绑定管理机器人,支持Minecraft账号和B站账号绑定与管理。",
4
- "version": "2.1.7",
4
+ "version": "2.1.8",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [