0.3.0 • Published 7 months ago

modern-rank-card v0.3.0

Weekly downloads
-
License
ISC
Repository
-
Last release
7 months ago

modern-rank-card

downloadsBadge versionBadge

Easy setup!

With modern-rank-card you can add beautiful modern images to the ranks of your Discord bot level system. Beautiful, Efficient and Light.

Installation

$ npm install --save modern-rank-card

Here's a complete example (compatible with discord.js v14+)

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] })

Credits

Made by BvrDev My Discord: @rightthere

0.3.0

7 months ago

0.2.0

7 months ago

0.1.0

7 months ago

0.0.1

7 months ago