Closed itsecres-nandant closed 4 years ago
I'm actually looking to get rid of example.js
and instead opt for a clearer description of all functionality through a guide https://waguide.pedroslopez.me/. The example file is getting pretty messy and is far from ideal for new people to learn how to do things with the library.
For now, you can check out the initial part of the guide in the link above, or read the full documentation and all available methods at https://pedroslopez.me/whatsapp-web.js
Example: of removing a participant.
client.on("message", async (msg) => { if (msg.body.includes("!kick")) {
const contact = await msg.getMentions();
const chat = await msg.getChat();
await chat.removeParticipants([contact[0].id._serialized]);
} });
example.js has limited implementation of features that it supports so please update example.js with all methods available, thank you