neplextech / canvacord

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.
https://canvacord.neplex.dev
GNU General Public License v3.0
255 stars 74 forks source link

rank.build doesn't do anything #72

Closed SuperS123 closed 3 years ago

SuperS123 commented 3 years ago

I'm using the sample code, just to test this lib, but when I try building, it doesn't do anything, the codes running, but it doesn't send anything, any ideas?

Code:

const rank = new Canvacord.Rank()
                    .setAvatar(img)
                    .setCurrentXP(xp)
                    .setRequiredXP(reqXp)
                    .setStatus("dnd")
                    .setProgressBar("#FFFFFF")
                    .setUsername(message.author.username)
                    .setDiscriminator("0007");

                rank.build()
                    .then(data => {
                        const attachment = new Discord.MessageAttachment(data, "RankCard.png");
                        message.channel.send(attachment);
                    });
            (everything is defined)
SuperS123 commented 3 years ago

it was a problem in my code, oops