llyrics

1.0.6 • Public • Published

llyrics

A simple package to fetch lyrics from Genius API.

NPM version

NPM Banner

This package was originally used only for my personal needs to fetch lyrics from Genius API using my discord bot, but then I decided to make this package open source and let everyone use it.


Install

npm install llyrics
# or
yarn add llyrics

Example

const findLyrics = require("llyrics"); // Import llyrics

client.on("interactionCreate", async (message) => {
    
    let apiKey = "GENIUS_API_KEY"; // Your Genius API Key
    let songName = "SONG_NAME"; // Song Name

    await findLyrics(apiKey, songName);

    const lyrics = findLyrics.lyrics; // To get the lyrics
    const trackName = findLyrics.trackName; // To get the Track Name
    const trackArtist = findLyrics.trackArtist; // To get the Track Artis

    interaction.channel.send({
        content: lyrics,
    });
});

client.login("token");

Usage

Option Type Description
apiKey String Genius API Key to fetch the lyrics from their API.
https://genius.com/api-clients
songName String Song name to fetch the lyrics.

Package Sidebar

Install

npm i llyrics

Weekly Downloads

17

Version

1.0.6

License

ISC

Unpacked Size

5.15 kB

Total Files

6

Last publish

Collaborators

  • lewdhutao_