koishi-plugin-group-verification 1.0.25 → 1.0.26
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/lib/index.js +4 -0
- package/package.json +1 -1
- package/src/index.ts +6 -0
package/lib/index.js
CHANGED
|
@@ -562,6 +562,10 @@ function apply(ctx, config) {
|
|
|
562
562
|
primary: "id",
|
|
563
563
|
autoInc: true
|
|
564
564
|
});
|
|
565
|
+
ctx.on("guild-member-request", async (session) => {
|
|
566
|
+
logger.info("收到 guild-member-request 事件,转发给处理函数");
|
|
567
|
+
await handleGuildMemberRequestEvent(ctx, session);
|
|
568
|
+
});
|
|
565
569
|
ctx.on("guild-member-added", async (session) => {
|
|
566
570
|
const groupId = session.guildId;
|
|
567
571
|
const userId = session.userId;
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -743,6 +743,12 @@ export function apply(ctx: Context, config: Config) {
|
|
|
743
743
|
|
|
744
744
|
|
|
745
745
|
|
|
746
|
+
// 监听 guild-member-request 事件,以便对新申请执行自动审批或拒绝
|
|
747
|
+
ctx.on('guild-member-request', async (session) => {
|
|
748
|
+
logger.info('收到 guild-member-request 事件,转发给处理函数')
|
|
749
|
+
await handleGuildMemberRequestEvent(ctx, session)
|
|
750
|
+
})
|
|
751
|
+
|
|
746
752
|
// 监听群成员增加事件(包括手动邀请入群)
|
|
747
753
|
ctx.on('guild-member-added', async (session) => {
|
|
748
754
|
const groupId = session.guildId
|