diff --git a/Haina/分享&培训/Untitled.md b/Haina/分享&培训/Untitled.md new file mode 100644 index 0000000..a4edfba --- /dev/null +++ b/Haina/分享&培训/Untitled.md @@ -0,0 +1,29 @@ + + +``` ts + +await sock.sendPresenceUpdate('available', id) + + + +``` + +This lets the person/group with ``` id ``` know whether you're online, offline, typing etc. + + + +``` presence ``` can be one of the following: + +``` ts + +type WAPresence = 'unavailable' | 'available' | 'composing' | 'recording' | 'paused' + +``` + + + +The presence expires after about 10 seconds. + + + +**Note:** In the multi-device version of WhatsApp -- if a desktop client is active, WA doesn't send push notifications to the device. If you would like to receive said notifications -- mark your Baileys client offline using `sock.sendPresenceUpdate('unavailable')` \ No newline at end of file