@hitomihiumi/discord-cards
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

npm version npm downloads

Introduction

A simple module with out-of-the-box solutions for rank, profile and user greeting cards.

Get Started

  1. Install the module by using npm i @hitomihiumi/discord-cards@latest
  2. 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.

Dependencies (2)

Dev Dependencies (6)

Package Sidebar

Install

npm i @hitomihiumi/discord-cards

Weekly Downloads

18

Version

1.0.1

License

MIT

Unpacked Size

3.82 MB

Total Files

51

Last publish

Collaborators

  • hitomihiumi