WhiskeySockets / Baileys

Lightweight full-featured typescript/javascript WhatsApp Web API
https://baileys.whiskeysockets.io/
MIT License
3.63k stars 1.23k forks source link

get all contacts #296

Closed sg957 closed 1 year ago

sg957 commented 1 year ago

Is there a way to get all the contacts? I don't mean the list of chats but the list of all contacts Thank you

danufirda commented 1 year ago

sudah ada di dokumentasi

sg957 commented 1 year ago

sudah ada di dokumentasi

Can you show me where it appears in the documentation? I only see an option to get all chats, not all contacts

danufirda commented 1 year ago

sock.ev.on('contacts.upsert', (contact) => {

});

ini hanya muncul pertama setelah baileys terkoneksi dengan whatsapp, dan akan muncul kembali menampilkan kontak jika ada kontak baru. sebaiknya anda menyimpannya di .json atau sql

mdev-imagenet commented 1 year ago

I think this could help also (Baileys 'store' Doc): https://github.com/WhiskeySockets/Baileys/blob/ab2b530ac5a088830bea35f4630f6a65d97eadb2/README.md?plain=1#L299

renatoiub commented 1 year ago

Também queria saber como fazer.

PurpShell commented 1 year ago

Create a store, bind it, periodically save it, and load it from json on start Then, you can simply access store.contacts