rank-card-generator
v1.0.9
Published
rankcard-generator is a tool that can be used to generate a current rank card for a level up system using discord.js
Downloads
23
Readme
rankcard-generator is a tool that can be used to generate a current rank card for a level up system using discord.js
Installation
npm i rank-card-generator
Usage
ctx.rankcard(emptyFillColour, barFillColour, currentLevel, currentXP, xpToNextLevel, member)
Function Parameters Explained
- emptyFillColour - A Hexadecimal colour for the background fill of the progress bar
- barFillColour - The colour of the progress bar itself(Hexadecimal Colour)
- currentLavel - The level the member is currently at
- currentXP - The current amount of XP the member posseses
- xpToNextLevel - The amount of XP the member requires to level up
- member - GuildMember instance from discord.js, required for the member's display name
Prerequisistes
To use this package please First make sure you have the Following packages installed
- discord.js
- canvas
- canvas-extras
Links
- [canvas] (https://npmjs.com/package/canvas)
- [canvas-extras] (https://npmjs.com/package/canvas-extras)
- [discord.js] (https://npmjs.com/package/discord.js)
Credit to ohtrobinson for the canvas-extras package. Without it this package would not have been possible!