DEV Community

Cover image for Awesome Music Cards For Discord Bots
Kunal Kande Patil
Kunal Kande Patil

Posted on • Edited on

2 1 1 2 2

Awesome Music Cards For Discord Bots

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

Installation

// using npm
npm install musicard

// using yarn
yarn add musicard
Enter fullscreen mode Exit fullscreen mode

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);
})()
Enter fullscreen mode Exit fullscreen mode

Using Discord Bot

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

const musicard = await Classic({});

...

return message.channel.send({
    files: [{
        attachment: musicard
    }]
})
Enter fullscreen mode Exit fullscreen mode

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);
})()
Enter fullscreen mode Exit fullscreen mode

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);
})()
Enter fullscreen mode Exit fullscreen mode

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);
})()
Enter fullscreen mode Exit fullscreen mode

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);
})()
Enter fullscreen mode Exit fullscreen mode

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);
})()
Enter fullscreen mode Exit fullscreen mode

Resource

Pull request to add your project here.

Licence

GPL

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read full post →

Top comments (3)

Collapse
 
thomasbnt profile image
Thomas Bnt

Hey 👋🏼

This looks like a good post here. Can you share this in full on DEV?

DEV generally asks that folks share their posts in full if possible and there is tooling provided to make it so that it's relatively easy to repost from outside blogs.

Hope you'll consider sharing the full post going forward.

Collapse
 
flameface profile image
Kunal Kande Patil

Done!

Collapse
 
thomasbnt profile image
Thomas Bnt

Awesome! Thank you!

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs