lint: examples

This commit is contained in:
Adhiraj Singh
2022-01-22 11:37:39 +05:30
parent 57d6ab62a1
commit e954fc0053
2 changed files with 104 additions and 103 deletions

View File

@@ -1,6 +1,6 @@
import P from "pino" import { Boom } from '@hapi/boom'
import { Boom } from "@hapi/boom" import P from 'pino'
import { makeWALegacySocket, DisconnectReason, AnyMessageContent, delay, useSingleFileLegacyAuthState, makeInMemoryStore } from '../src' import { AnyMessageContent, delay, DisconnectReason, makeInMemoryStore, makeWALegacySocket, useSingleFileLegacyAuthState } from '../src'
// the store maintains the data of the WA connection in memory // the store maintains the data of the WA connection in memory
// can be written out to a file & read from it // can be written out to a file & read from it

View File

@@ -1,6 +1,6 @@
import P from "pino" import { Boom } from '@hapi/boom'
import { Boom } from "@hapi/boom" import P from 'pino'
import makeWASocket, { DisconnectReason, AnyMessageContent, delay, useSingleFileAuthState, makeInMemoryStore } from '../src' import makeWASocket, { AnyMessageContent, delay, DisconnectReason, makeInMemoryStore, useSingleFileAuthState } from '../src'
// the store maintains the data of the WA connection in memory // the store maintains the data of the WA connection in memory
// can be written out to a file & read from it // can be written out to a file & read from it
@@ -59,6 +59,7 @@ const startSock = () => {
}) })
sock.ev.on('messages.update', m => console.log(m)) sock.ev.on('messages.update', m => console.log(m))
sock.ev.on('message-receipt.update', m => console.log(m))
sock.ev.on('presence.update', m => console.log(m)) sock.ev.on('presence.update', m => console.log(m))
sock.ev.on('chats.update', m => console.log(m)) sock.ev.on('chats.update', m => console.log(m))
sock.ev.on('contacts.upsert', m => console.log(m)) sock.ev.on('contacts.upsert', m => console.log(m))