Skip to content

Easily generate images using react-like components in nodejs. Canvacord is suitable for creating dynamic images such as social media posts, greetings cards, memes, etc. It is also possible to create your own templates and builders to generate images. You are only limited by your imagination.

License

Notifications You must be signed in to change notification settings

neplextech/canvacord

Folders and files

NameName
Last commit message
Last commit date

Latest commit

7e181cb Β· Sep 12, 2022

History

93 Commits
Jul 13, 2022
Jul 13, 2022
Feb 25, 2021
Jul 13, 2022
Sep 12, 2022
Jul 16, 2022
Aug 16, 2022
Jul 16, 2022
Aug 16, 2022
Apr 16, 2022
Jul 13, 2022
Oct 3, 2020
Oct 2, 2020
Nov 1, 2020
Aug 9, 2022
Aug 9, 2022
Nov 1, 2020
Sep 12, 2022
Aug 13, 2022

Repository files navigation

SWUbanner

Canvacord

Powerful image manipulation tool to manipulate images easily.

Installation

$ npm i canvacord

NPM

Features

  • Super simple and easy to use 😎
  • Faster than canvacord v4 πŸš€
  • More than 50 methods...? Yay! πŸŽ‰
  • Built on top of @napi-rs/canvas πŸ”₯
  • Object oriented πŸ’»
  • Beginner friendly πŸ€“
  • Supports emojis πŸ˜€

Documentation

https://canvacord.js.org

Join our Discord server

https://discord.gg/CR8JxrxSwr

Examples

Rank Card

const canvacord = require("canvacord");
const img = "https://cdn.discordapp.com/embed/avatars/0.png";

const userData = getDataSomehow();

const rank = new canvacord.Rank()
    .setAvatar(img)
    .setCurrentXP(userData.xp)
    .setRequiredXP(userData.requiredXP)
    .setStatus("dnd")
    .setProgressBar("#FFFFFF", "COLOR")
    .setUsername("Snowflake")
    .setDiscriminator("0007");

rank.build()
    .then(data => {
        const attachment = new Discord.MessageAttachment(data, "RankCard.png");
        message.channel.send(attachment);
    });

Preview

RankCard

Other Examples

const Discord = require("discord.js");
const client = new Discord.Client();
const canvacord = require("canvacord");

client.on("ready", () => {
    console.log("I'm online!");
});

client.on("message", async (message) => {
    if (message.author.bot) return;
    if (message.content === "!triggered") {
        let avatar = message.author.displayAvatarURL({ dynamic: false, format: 'png' });
        let image = await canvacord.Canvas.trigger(avatar);
        let attachment = new Discord.MessageAttachment(image, "triggered.gif");
        return message.channel.send(attachment);
    }
});

client.login("Your_Bot_Token_here");

Support me

Note

⚠ | In order to use Canvacord#Welcomer/Canvacord#Leaver/Canvacord#CaptchaGen, you may need to install packages like discord-canvas & captcha-canvas.

About

Easily generate images using react-like components in nodejs. Canvacord is suitable for creating dynamic images such as social media posts, greetings cards, memes, etc. It is also possible to create your own templates and builders to generate images. You are only limited by your imagination.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages