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:
3 files changed
+42
No files matched your search
@@ -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'));
|
||||
```
|
||||
|
||||
Reference in new issue
Block a user