Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

findlyric

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

findlyric

A simple package to fetch lyrics from Genius API

  • 1.0.0
  • unpublished
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

findlyrics

A simple package to fetch lyrics from Genius API.

NPM version

NPM Banner

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
# or
yarn add findlyrics

Example

const createCard = require("songcard"); // Import
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

OptionTypeDescription
imageBgStringImage that will be display to the songcard.

Example: https://images-ext-1.discordapp.net/external/uw_-bWFyeXnWb11wGThe2CAbTYdrxzFqMJ2trxDIYVE/https/i.scdn.co/image/ab67616d0000b2738ad8f5243d6534e03b656c8b?width=468&height=468
File format: PNG/JPEG
imageTextStringText that will be display to the songcard.
trackStreamBooleanWhether to set the trackDuration and trackTotalDuration to LIVE

Example: if trackStream is true the trackDuration and totalTrackDuration will show as LIVE else it will show number.
trackDurationIntegerShow current duration of the songs. If no value provide it will show 0:00.
trackTotalDurationIntegerShow the songs duration.



FAQs

Package last updated on 29 Sep 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc