wa-api-with-personnal-assistant
v1.0.4
Published
``` npm i @rexy4/wa-api ``` ``` yarn add @rexy4/wa-api ```
Downloads
4
Readme
whatshapp api module open source
You can install whit :
npm i npm i wa-api-with-personnal-assistant
yarn add npm i wa-api-with-personnal-assistant
Example Use With express js :
const {runWhatsappClient, qrValue, sendMessage} = require("@rexy4/wa-api")
const express = require("express");
const app = express();
//active : code for actived personal asisstan example : AI!
//nonActive : code for nonActive personal asisstan example : AIX!
//apiKey : ure use gorq-ai for get apikey
//system about your system ai example : My Name is Jarvis
// your phone number with code example : +628626367
runWhatsappClient(active, nonActive, apiKey, system, name, phone);
app.use(express.json())
app.post("/message", async (req, res)=>{
const sendMessages = await sendMessage(req.body.phone, req.body.message);
res.send({
status : "success",
statusCode : 200,
message : sendMessages,
})
})
app.listen(4000, ()=>console.log(`Running on port ${4000}`))