Skip to content

Commit 70d7870

Browse files
committed
👽️ 对群员减少事件operator_id为0进行处理
- fix #157 - fix #ICSG16
1 parent 5c271f9 commit 70d7870

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

apps/events/notice_group.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ function handleDecrease(e, bot, cfg) {
3232
`操作人账号:${e.operator_id}\n`,
3333
`解散群号:${e.group_id}`
3434
])
35-
} else if ((e.user_id === bot.uin && e.operator_id !== bot.uin) || e.sub_type === "kick_me") {
35+
} else if (e.user_id === bot.uin && e.operator_id !== bot.uin) {
3636
if (!cfg.groupNumberChange) return false
3737
return buildMessage(e, "机器人被踢", [
3838
`操作人账号:${e.operator_id}\n`,
3939
`被踢群号:${e.group_id}`
4040
])
41-
} else if ((e.operator_id === e.user_id) || e.sub_type === "leave") {
41+
} else if (!e.operator_id || (e.operator_id === e.user_id)) {
4242
if (!cfg.groupMemberNumberChange) return false
4343
if (e.user_id === bot.uin) {
4444
if (!cfg.groupNumberChange) return false
@@ -51,7 +51,7 @@ function handleDecrease(e, bot, cfg) {
5151
`退出群号:${e.group_id}`
5252
])
5353
}
54-
} else if ((e.operator_id !== e.user_id) || e.sub_type === "kick") {
54+
} else if (e.operator_id !== e.user_id) {
5555
if (!cfg.groupMemberNumberChange) return false
5656
return buildMessage(e, "群员被踢", [
5757
`操作人账号:${e.operator_id}\n`,

0 commit comments

Comments
 (0)