@hitomihiumi/discord-cards
v1.0.1
Published
A simple module with out-of-the-box solutions for rank, profile and user greeting cards.
Downloads
11
Maintainers
Readme
Introduction
A simple module with out-of-the-box solutions for rank, profile and user greeting cards.
Get Started
- Install the module by using
npm i @hitomihiumi/discord-cards@latest
- Enjoy!
Documentation
You can find the documentation here
Example
import { RankCard, fonts } from "@hitomihiumi/discord-cards";
import * as fs from 'fs';
const card = new RankCard()
.setAvatar('https://i.pinimg.com/1200x/f3/32/19/f332192b2090f437ca9f49c1002287b6.jpg')
.setBackground('https://www.sumadhwaseva.com/wp-content/uploads/2013/10/Grey-Background-Website-Wallpapers-600x200.jpg')
.setLevel(5)
.setCurrentXp(100)
.setNeededXp(200)
.setProgressColor('#7289da')
.setTextColor('#ffffff')
.setStyle('base')
.setName('Hitomi')
.setFont(fonts.opensansBold);
async function main() {
let canvas = await card.render();
fs.writeFileSync('test.png', canvas);
}
main();
Styles
Styles storage location discord-cards-styles
repository. To load your own styles, create a pull-request.