@ramkrishna-js/framecard
v1.0.0
Published
🎨 A beautiful and fast music card generator for Discord bots.
Maintainers
Readme
@ramkrishna-js/framecard
🎨 A beautiful, fast, and highly customizable music card generator for Discord bots.
Features
- ✨ Sleek Design: Modern floating card aesthetic inspired by popular music players.
- ⚡ High Performance: Built with
@napi-rs/canvasfor extremely fast image generation. - 🌈 Customizable: Change colors, thumbnails, titles, authors, and progress.
- 🛠️ Easy to Use: Simple and intuitive builder pattern.
Installation
npm install @ramkrishna-js/framecardUsage
import { ClassicCard } from '@ramkrishna-js/framecard';
import fs from 'fs';
const card = new ClassicCard()
.setTitle('Never Gonna Give You Up')
.setAuthor('Rick Astley')
.setThumbnail('https://img.youtube.com/vi/dQw4w9WgXcQ/hqdefault.jpg')
.setColor('#ff0000') // Custom theme color
.setProgress(50) // Progress in percentage
.setStartTime('1:45')
.setEndTime('3:32');
const buffer = await card.build();
fs.writeFileSync('card.png', buffer);Preview
The generated card features a blurred background, a rounded thumbnail with shadow, and a sleek progress bar with a glow effect and knob.
License
MIT © Ramkrishna
