feat(onebot): report forced offline as notice/bot_offline
Register a handler for the StatusService.KickNT push (QQ NT's unified
forced-offline notification — kick / login-elsewhere / risk-control),
decode KickNTResponse and emit bot_offline {user_id, tag, message},
matching NapCat. Command + field layout (f4=tips_title, f3=tips_content)
RE-confirmed against wrapper.linux.node + Lagrange; not yet live-captured.
This commit is contained in:
9 files changed
+120
-1
No files matched your search
@@ -294,6 +294,17 @@ export interface PttTransResultEvent extends QQEvent {
|
||||
text: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* The bot account was forced offline (kicked / logged in elsewhere / risk-control)
|
||||
* — SSO push `StatusService.KickNT`. Mirrors NapCat's OB11BotOfflineEvent →
|
||||
* `notice_type:'bot_offline'`. `tag` = short title, `message` = description.
|
||||
*/
|
||||
export interface BotOfflineEvent extends QQEvent {
|
||||
kind: 'bot_offline';
|
||||
tag: string;
|
||||
message: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* A group member's card (群名片) changed — detected from message traffic when
|
||||
* the sender's live card differs from the cached one (same mechanism as NapCat's
|
||||
@@ -377,4 +388,5 @@ export type QQEventVariant =
|
||||
| GroupNameChangeEvent
|
||||
| GroupCardChangeEvent
|
||||
| GroupTitleChangeEvent
|
||||
| FriendProfileLikeEvent;
|
||||
| FriendProfileLikeEvent
|
||||
| BotOfflineEvent;
|
||||
Reference in new issue
Block a user