@delirius/welcard
TypeScript icon, indicating that this package has built-in type declarations

1.0.34 • Public • Published

typescript-starter dark logo

**@delirius/welcard** is a lightweight and futuristic welcome card libary designed for WhatsApp & Discords Bots.

version downloads install size

Installation

npm i @delirius/welcard

Usage with Baileys (WhatsApp Bot)

// ES6
import { WelCard } from "@delirius/welcard";

// CommonJS
const { WelCard } = require("@delirius/welcard");

const card = new WelCard()
  .setName("Welcome")
  .setAuthor('Participants')
  .setServer('Group Name')
  .setColor("auto")
  .setBrightness(50)
  .setThumbnail("https://i.postimg.cc/3rLKbgLH/image.jpg");
const cardBuffer = await card.build();

sock.sendMessage(jid, { image: cardBuffer }); // sending the image]

Standalone Usage

// ES6
import { WelCard } from "@delirius/welcard";
import fs from "fs";

// CommonJS
const { WelCard } = require("@delirius/welcard");
const fs = require("fs");

(async () => {
  const card = new WelCard()
    .setName("Bienvenido")
    .setAuthor("Sareth")
    .setServer("Delirius Bot 🪐")
    .setColor("auto")
    .setBrightness(50)
    .setThumbnail("https://i.postimg.cc/3rLKbgLH/image.jpg");

  const cardBuffer = await card.build();

  fs.writeFileSync("card.png", cardBuffer);
  console.log("Listo");
})();

Search Lyrics

// ES6
import { searchLyrics } from "@delirius/welcard";

// CommonJS
const { searchLyrics } = require("@delirius/welcard");

(async () => {
const result = await searchLyrics("Money lisa");
console.log(result);
})();

SSWEB

// ES6
import { ssweb } from "@delirius/welcard";
import fs from "fs";

// CommonJS
const { ssweb } = require("@delirius/welcard");
const fs = require("fs");

(async () => {
  const res = await ssweb("https://www.npmjs.com/package/@delirius/welcard");
  fs.writeFileSync("ssweb.png", res.result);
  console.log("Done.");
});

Support and Updates

This project will receive updates and more details will be implemented.

Dependents (0)

Package Sidebar

Install

npm i @delirius/welcard

Weekly Downloads

61

Version

1.0.34

License

MIT

Unpacked Size

13.5 MB

Total Files

23

Last publish

Collaborators

  • delirius