farizgd-baileys
v2.67.69
Published
WhatsApp Library Modified By FarizGD
Readme
FarizGD-Baileys
Modified Whatsapp-API
(btw gambar diatas kalo kalian refresh website ini, gambarnya bakal berubah)
Package Repo
https://github.com/FarizGD/FarizGD-Baileys
Usage
"depencies": {
"@whiskeysockets/baileys": "farizgd-baileys"
}Import
const {
default:makeWASocket,
// Other Options
} = require('@whiskeysockets/baileys');How To Connect To Whatsapp
With QR Code
const {
default: makeWASocket
} = require('@whiskeysockets/baileys');
const client = makeWASocket({
browser: ['Ubuntu', 'Chrome', '20.00.1'],
printQRInTerminal: true
})Connect With Number
const {
default: makeWASocket,
fetchLatestWAWebVersion
} = require('@whiskeysockets/baileys');
const client = makeWASocket({
browser: ['Ubuntu', 'Chrome', '20.00.1'],
printQRInTerminal: false,
version: fetchLatestWAWebVersion()
// Other options
});
const number = "628XXXXX";
const code = await client.requestPairingCode(number.trim) /* Use : (number, "YYYYYYYY") for custom-pairing */
console.log("Ur pairing code : " + code)Sending messages
send orderMessage
const fs = require('fs');
const img = fs.readFileSync('./some-img-here');
await client.sendMessage(m.chat, {
thumbnail: img,
message: "go fuck urself",
orderTitle: "FarizGD",
totalAmount1000: 69420,
totalCurrencyCode: "IDR"
}, { quoted:m })send pollResultSnapshotMessage
await client.sendMessage(m.chat, {
pollResultMessage: {
name: "n",
options: [
{
optionName: "poll 1"
},
{
optionName: "poll 2"
}
],
newsletter: {
newsletterName: "FarizGD",
newsletterJid: "1@newsletter"
}
}
})send productMessage
await client.relayMessage(m.chat, {
productMessage {
title: "what",
description: "i play c.ai btw",
thumbnail: { url: "./imagepath" },
productId: "EXAMPLE_TOKEN",
retailerId: "EXAMPLE_RETAILER_ID",
url: "https://t.me/farizgd",
body: "hell nah",
footer: "Footer",
buttons: [
{
name: "cta_url",
buttonParamsJson: "{\"display_text\":\"FarizGD\",\"url\":\"https://t.me/farizgd\"}"
}
],
priceAmount1000: 69420,
currencyCode: "IDR"
}
})-_-
