With modern-rank-card
you can add beautiful modern images to the ranks of your Discord bot level system.
Beautiful, Efficient and Light.
$ npm install --save modern-rank-card
const Canvas = require("modern-rank-card"),
const { AttachmentBuilder } = require("discord.js");
let image = await new Canvas.RankCard()
.setAddon("xp", false)
.setAddon("rank", false)
.setAddon("color", true)
.setAvatar(message.author.displayAvatarURL({ extension: "png" }))
.setUsername(message.author.username)
.setLevel(96)
.setXP("current", 26300)
.setXP("needed", 51000)
.setColor("level", "#ffffff")
.setBackground("https://i.imgur.com/hwgvX0t.png")
.toAttachment();
let attachment = new AttachmentBuilder(image.toBuffer(), { name: "rank.png" });
message.channel.send({ file: [attachment] })
Made by BvrDev My Discord: @rightthere