mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
13 lines
317 B
TypeScript
13 lines
317 B
TypeScript
import makeConnection from '../src'
|
|
import * as fs from 'fs'
|
|
|
|
async function example() {
|
|
const conn = makeConnection({
|
|
credentials: './auth_info.json'
|
|
})
|
|
conn.ev.on('connection.update', state => {
|
|
console.log(state)
|
|
})
|
|
}
|
|
|
|
example().catch((err) => console.log(`encountered error`, err)) |