feat(sdk): add onBotStatus for account session notices

Let bots subscribe to account up/down without using the operator notification channels.
This commit is contained in:
DrSmoothl committed 2026-09-16 21:20:51 +08:00
1 parent ad36d47cf0
commit 23ebee7f20
3 files changed
+42

No files matched your search

+4
View File
@@ -91,6 +91,10 @@ bot.onRequest('friend', async (_event, ctx) => {
await ctx.approve();
});
bot.onBotStatus((event) => {
console.log(event.sub_type, event.user_id);
});
await bot.connect();
await bot.sendPrivateMessage(10001, text('ready'));
```