vinzzknight
v1.0.4
Published
WhatsApp API Modification By Vinzz
Maintainers
Readme
Modified Whatsapp-API
Usage
"depencies": {
"vinzzknight": "latest"
}Import
const {
default:makeWASocket,
// Other Options
} = require('vinzzknight');How To Connect To Whatsapp
With QR Code
const {
default: makeWASocket
} = require('vinzzknight');
const client = makeWASocket({
browser: ['Ubuntu', 'Chrome', '20.00.1'],
printQRInTerminal: true
})Connect With Number
const {
default: makeWASocket,
fetchLatestWAWebVersion
} = require('vinzzknight');
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 : " + "VINZZJSS")Sending messages
send orderMessage
const fs = require('fs');
const vinzzImg = fs.readFileSync('./VinzzImage');
await client.sendMessage(m.chat, {
thumbnail: vinzz,
message: "Gotta get a grip",
orderTitle: "Vinzz-Developer",
totalAmount1000: 72502,
totalCurrencyCode: "IDR"
}, { quoted:m })send pollResultSnapshotMessage
await client.sendMessage(m.chat, {
pollResultMessage: {
name: "Vinzz-Developer",
options: [
{
optionName: "poll 1"
},
{
optionName: "poll 2"
}
],
newsletter: {
newsletterName: "💸 —͟͞͞VinzzOfficial",
newsletterJid: "120363389012094856@newsletter"
}
}
})send productMessage
await client.relayMessage(m.chat, {
productMessage {
title: "Vinzz-Developer",
description: "zZZ...",
thumbnail: { url: "./VinzzImage" },
productId: "EXAMPLE_TOKEN",
retailerId: "EXAMPLE_RETAILER_ID",
url: "https://t.me/Vinzz-Developer",
body: "Nak Tido",
footer: "Footer",
buttons: [
{
name: "cta_url",
buttonParamsJson: "{\"display_text\":\"Vinzz-Developer\",\"url\":\"https://t.me/VinzzOfficial\"}"
}
],
priceAmount1000: 72502,
currencyCode: "IDR"
}
})