modern-rank-card

0.3.0 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i modern-rank-card

Weekly Downloads

0

Version

0.3.0

License

ISC

Unpacked Size

555 kB

Total Files

11

Last publish

Collaborators

  • bvrdev