findlyrics
A simple package to fetch lyrics from Genius API.
This package was originally used only for my personal needs to generate a song card when users play songs using my Discord bot, but then I decided to make this package open source and let everyone use it.
Install
npm install findlyrics
yarn add findlyrics
Example
const createCard = require("songcard");
const { AttachmentBuilder } = require("discord.js");
client.on("interactionCreate", async (message) => {
const cardImage = await createCard(
imageBg = "https://images-ext-1.discordapp.net/external/uw_-bWFyeXnWb11wGThe2CAbTYdrxzFqMJ2trxDIYVE/https/i.scdn.co/image/ab67616d0000b2738ad8f5243d6534e03b656c8b?width=468&height=468",
imageText = "Die For You (with Ariana Grande) - Remix",
trackStream = false,
trackDuration = 220000,
trackTotalDuration = 233000,
);
const attachment = new AttachmentBuilder(cardImage, {
name: "card.png",
});
interaction.channel.send({
files: [attachment],
});
});
client.login("token");
Usage