Skip to content
/ azsa Public

Thư viện Nodejs cho Facebook Messenger (old version).

Notifications You must be signed in to change notification settings

Teav4/azsa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hướng dẫn cơ bản

Tạo file .env

USER_AGENT=Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0
COOKIE=
SELF_FACEBOOK_ID=

index.ts

import { listen, UserConnectOptions } from 'azsa'
import config from './config'
import log from './utils/log'

const { userData } = config

if (!(userData.userAgent && userData.cookie && userData.selfFacebookID)) {
  log('error', 'Invalid user data.', JSON.stringify(userData))
  process.exit()
}

const User: UserConnectOptions = {
  userAgent: userData.userAgent,
  cookie: userData.cookie,
  selfFacebookID: parseInt(userData.selfFacebookID, 10),
}

listen(User, (message, Api) => {
  log('info', message.text)
})

API

azsa.listen

API Documentation

Azsa.listen (message, Api)

  1. message props
  • Event Type Field Description

About

Thư viện Nodejs cho Facebook Messenger (old version).

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published