UNPKG

image-cord

Version:

It is a package used to make discord bots. It sends attachments of image manipulation, Anime, nsfw, and more pictures easily without any APIs.

30 lines (20 loc) 767 B
const Fetch = require("node-fetch"); const { Canvas, resolveImage } = require('canvas-constructor') const canvas = require('canvas') async function Witchlogo(options = {}) { if (!options.text) throw new Error(`No text`); if (options.text.length > 15) throw new Error(`Text should be less than 15`); const img = await canvas.loadImage('https://i.ibb.co/sVbRLHm/Hand-Drawn-Witch-Purple-Logo.png'); let image = new Canvas(500, 500) .printImage(img, 0, 0, 500, 500) .setColor("#FFFFFF") .setTextFont('44px Vampire Wars') .setTextAlign("center") .printWrappedText(options.text, 250, 362) .toBuffer(); if (options.ResultOnly && options.ResultOnly === true) return image; return image; }; module.exports = { Witchlogo };