koishi-plugin-group-control 0.2.0 → 0.2.2
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.
- package/README.md +1 -1
- package/lib/index.js +5 -1
- package/package.json +2 -2
package/README.md
CHANGED
package/lib/index.js
CHANGED
|
@@ -141,7 +141,11 @@ function apply(ctx, config) {
|
|
|
141
141
|
const pendingInvites = /* @__PURE__ */ new Map();
|
|
142
142
|
ctx.on("guild-request", async (session) => {
|
|
143
143
|
const { guildId, userId, platform } = session;
|
|
144
|
-
const
|
|
144
|
+
const raw = session.original || session.raw || session.event?._data || {};
|
|
145
|
+
const flag = raw.flag || session.flag || session.messageId;
|
|
146
|
+
if (!flag && config.invite.showDetailedLog) {
|
|
147
|
+
console.warn("Group Control: 未能提取到邀请 flag,可能导致无法处理邀请。Raw event:", JSON.stringify(raw));
|
|
148
|
+
}
|
|
145
149
|
let userName = userId;
|
|
146
150
|
try {
|
|
147
151
|
const userInfo = await session.bot.getUser(userId);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "koishi-plugin-group-control",
|
|
3
|
-
"description": "Koishi
|
|
4
|
-
"version": "0.2.
|
|
3
|
+
"description": "Koishi群聊自管理插件,支持自定义机器人进群消息、被踢出自动拉黑、刷屏自动屏蔽功能和主动退群指令等。(仅支持OneBot适配器)",
|
|
4
|
+
"version": "0.2.2",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
7
7
|
"files": [
|