From 88186d8c7472e184c92a9f7efd38ba622dc4fbd9 Mon Sep 17 00:00:00 2001 From: Adhiraj Date: Tue, 31 Mar 2020 20:05:10 +0530 Subject: [PATCH] readme update --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index e386042..2b9a311 100644 --- a/README.md +++ b/README.md @@ -15,18 +15,18 @@ Baileys is super easy to use: ``` If the connection is successful, you will see a QR code printed on your terminal screen, scan it with WhatsApp on your phone and you'll be logged in! 3. Implement the following event handlers in your code: - 1. ``` javascript + ``` javascript client.handlers.onConnected = () => { /* when you're successfully authenticated with the WhatsApp Web servers */ } - ``` - 2. ``` javascript + ``` + ``` javascript client.handlers.onUnreadMessage = (message) => { /* called when you have a pending unread message or recieve a new message */ } - ``` - 3. ``` javascript + ``` + ``` javascript client.handlers.onError = (error) => { /* called when there was an error */ } - ``` - 4. ``` javascript + ``` + ``` javascript client.handlers.onDisconnect = () => { /* called when internet gets disconnected */ } - ``` + ``` 4. Send a text message using ``` javascript client.sendTextMessage(id, txtMessage)