0.1.0-nightly • Published 2 years ago

fabuya v0.1.0-nightly

Weekly downloads
-
License
UNLICENSED
Repository
github
Last release
2 years ago

fabuya

An open-source Baileys WhatsApp API library wrapper. No puppeteer or selenium, faster than ever!

Fabuya wraps Baileys' user-bearable library into user-enjoyable library.

Simply put a client up and assign event handlers, that's it!

Installation

From NPM

npm install --save fabuya

More version on the documentation below

Documentation

https://github.com/HanzHaxors/fabuya/tree/main/docs

Power Up New Client

const fabuya = require('fabuya');

let config = {};
fabuya.create('clientName', config).then((client) => {
	// When QR changed or created
	// display them on console
	client.onQRUpdated((qr) => {
		console.log(qr);
	});
	
	// This is when the QR has been scanned
	client.onQRScanned(() => {
		console.log("[*] QR Code scanned, logging in...");
	});

	// This is fired when new incoming/outgoing
	// messages sent. Currently, the library also
	// includes system messages
	client.onMessage((msg) => {
		console.log("[i] New message: ", msg.content);
		msg.reply("Hello!");
	});
});

// Keep the program going
// omit this if you have other implementation
fabuya.forever();