musicard
TypeScript icon, indicating that this package has built-in type declarations

2.0.3 • Public • Published

Musicard is one of the best canvas libraries to create a variety of music cards.

GithubSupport

NPM Version NPM Downloads NPM License GitHub Repo stars

Installation

// using npm
npm install musicard

// using yarn
yarn add musicard

Usage

You can use the Musicard package in your Discord bots, websites, etc.

Using Create File

(async () => {
    const { Classic } = require("musicard");
    const fs = require("fs")

    const musicard = await Classic({ });

    // Creates PNG file
    fs.writeFileSync("musicard.png", musicard);
})()

Using Discord Bot

const { Classic } = require("musicard");
const fs = require("fs")

const musicard = await Classic({});

...

return message.channel.send({
    files: [{
        attachment: musicard
    }]
})

Themes

Musicard is the #1 canvas library to create music cards with awesome themes.

Classic

classic

(async () => {
    const { Classic } = require("musicard");
    const fs = require("fs")

    const musicard = await Classic({
        thumbnailImage: "https://lh3.googleusercontent.com/yavtBZZnoxaY21GSS_VIKSg0mvzu1b0r6arH8xvWVskoMaZ5ww3iDMgBNujnIWCt7MOkDsrKapSGCfc=w544-h544-l90-rj",
        backgroundColor: "#070707",
        progress: 10,
        progressColor: "#FF7A00",
        progressBarColor: "#5F2D00",
        name: "Burn",
        nameColor: "#FF7A00",
        author: "By 2WEI & Edda Hayes",
        authorColor: "#696969",
        startTime: "0:00",
        endTime: "4:00",
        timeColor: "#FF7A00"
    });

    fs.writeFileSync("musicard.png", musicard);
})()

Classic Pro

classicpro

(async () => {
    const { ClassicPro } = require("musicard");
    const fs = require("fs")

    const musicard = await ClassicPro({
        thumbnailImage: "https://lh3.googleusercontent.com/yavtBZZnoxaY21GSS_VIKSg0mvzu1b0r6arH8xvWVskoMaZ5ww3iDMgBNujnIWCt7MOkDsrKapSGCfc=w544-h544-l90-rj",
        backgroundColor: "#070707",
        progress: 10,
        progressColor: "#FF7A00",
        progressBarColor: "#5F2D00",
        name: "Burn",
        nameColor: "#FF7A00",
        author: "By 2WEI & Edda Hayes",
        authorColor: "#696969",
        startTime: "0:00",
        endTime: "4:00",
        timeColor: "#FF7A00"
    });

    fs.writeFileSync("musicard.png", musicard);
})()

Dynamic

dynamic

(async () => {
    const { Dynamic } = require("musicard");
    const fs = require("fs")

    const musicard = await Dynamic({
        thumbnailImage: "https://lh3.googleusercontent.com/yavtBZZnoxaY21GSS_VIKSg0mvzu1b0r6arH8xvWVskoMaZ5ww3iDMgBNujnIWCt7MOkDsrKapSGCfc=w544-h544-l90-rj",
        backgroundColor: "#070707",
        progress: 10,
        progressColor: "#FF7A00",
        progressBarColor: "#5F2D00",
        name: "Burn",
        nameColor: "#FF7A00",
        author: "By 2WEI & Edda Hayes",
        authorColor: "#696969"
    });

    fs.writeFileSync("musicard.png", musicard);
})()

Mini

mini

(async () => {
    const { Mini } = require("musicard");
    const fs = require("fs")

    const musicard = await Mini({
        thumbnailImage: "https://lh3.googleusercontent.com/yavtBZZnoxaY21GSS_VIKSg0mvzu1b0r6arH8xvWVskoMaZ5ww3iDMgBNujnIWCt7MOkDsrKapSGCfc=w544-h544-l90-rj",
        backgroundColor: "#070707",
        progress: 10,
        progressColor: "#FF7A00",
        progressBarColor: "#5F2D00",
        menuColor: "#FF7A00",
        paused: false
    });

    fs.writeFileSync("musicard.png", musicard);
})()

Mini Pro

minipro

(async () => {
    const { MiniPro } = require("musicard");
    const fs = require("fs")

    const musicard = await MiniPro({
        thumbnailImage: "https://lh3.googleusercontent.com/yavtBZZnoxaY21GSS_VIKSg0mvzu1b0r6arH8xvWVskoMaZ5ww3iDMgBNujnIWCt7MOkDsrKapSGCfc=w544-h544-l90-rj",
        backgroundColor: "#070707",
        progress: 10,
        progressColor: "#FF7A00",
        progressBarColor: "#5F2D00",
        name: "Burn",
        nameColor: "#FF7A00",
        author: "By 2WEI & Edda Hayes",
        authorColor: "#696969"
    });

    fs.writeFileSync("musicard.png", musicard);
})()

Resource

Pull request to add your project here.

Riffy Music Bot https://github.com/riffy-team/riffy-music-bot

Licence

GPL

Package Sidebar

Install

npm i musicard

Weekly Downloads

401

Version

2.0.3

License

GPL-3.0-only

Unpacked Size

355 kB

Total Files

13

Last publish

Collaborators

  • flameface