Wondering what’s next for npm?Check out our public roadmap! »

    canvacard

    5.1.4 • Public • Published

    Canvacard

    Potente herramienta de manipulación de imágenes para manipular imágenes fácilmente.

    Installation

    $ npm i canvacard

    NPM

    Features

    • Súper simple y fácil de usar 😎
    • Más rápido que canvacard v4 🚀
    • ¿Más de 50 métodos ...? ¡Hurra! 🎉
    • Construido sobre un lienzo de nodos y sin tonterías involucradas 🔥
    • Orientado a objetos 💻
    • Apto para principiantes 🤓
    • Soporta emojis 😀

    Examples

    Rank Card

    const canvacard = require("canvacard");
    const img = "https://cdn.discordapp.com/embed/avatars/0.png";
    
    const userData = getDataSomehow();
    
    const rank = new canvacard.Rank()
        .setAvatar(img)
        .setCurrentXP(userData.xp)
        .setRequiredXP(userData.requiredXP)
        .setStatus("dnd")
        .setProgressBar("#FFFFFF", "COLOR")
        .setUsername("SrGobi")
        .setDiscriminator("5100");
    
    rank.build()
        .then(data => {
            const attachment = new Discord.MessageAttachment(data, "RankCard.png");
            message.channel.send(attachment);
        });

    Preview

    RankCard

    Welcomer Card

    const canvacard = require("canvacard");
    const img = "https://cdn.discordapp.com/embed/avatars/0.png";
    const background = "https://i.imgur.com/ulr1KDT.png";
    
    const welcomer = new canvacard.Welcomer()
        .setUsername("SrGobi")
        .setDiscriminator("5100")
        .setDescription("Descripción personalizable")
        .setGuildName("ESP CUSTOMS")
        .setBackground('IMAGE', background)
        .setAvatar(img)
        .setOpacityBorder("0.5")
        .setColorCircle("#FFFFFF")
        .setColor("border", "#4D5E94")
        .setColor("username-box", "#4D5E94")
        .setColor("discriminator-box", "#4D5E94")
        .setColor("message-box", "#4D5E94")
        .setColor("title", "#4D5E94")
        .setColor("avatar", "#4D5E94")
    
    welcomer.build()
        .then(data => {
            const attachment = new Discord.MessageAttachment(data, "WelcomerCard.png");
            message.channel.send(attachment);
        });

    Preview

    WelcomerCard

    Other Examples

    const Discord = require("discord.js");
    const client = new Discord.Client();
    const canvacard = require("canvacard");
    
    client.on("ready", () => {
        console.log("¡Estoy en línea!");
    });
    
    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 canvacard.Canvas.trigger(avatar);
            let attachment = new Discord.MessageAttachment(image, "triggered.gif");
            return message.channel.send(attachment);
        }
    });
    
    client.login("Tu_Bot_Token_aqui");

    Note

    | Para usar Canvacard#Welcomer/Canvacard#Leaver/Canvacard#CaptchaGen, es posible que deba instalar paquetes como discord-canvascard & captcha-canvas.

    Install

    npm i canvacard

    DownloadsWeekly Downloads

    17

    Version

    5.1.4

    License

    GPL-3.0

    Unpacked Size

    158 kB

    Total Files

    31

    Last publish

    Collaborators

    • avatar