Skip to content

An adorable lavalink discord music bot that has a lot of features inside it.

License

Notifications You must be signed in to change notification settings

Weeb-Devs/Laffey

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laffey

An adorable lavalink discord music bot that has a lot of features inside it.

laffey

© Azur Lane | First Project of Weeb-Devs

Features:

✓ High quality
✓ Support filters
✓ Auto resume
✓ Stable
✓ Suport 8 music sources
✓ Feature-rich
✓ Full slash commands
✓ and of course, adorable shipgirl

Current version:

Registering your slash commands

Read this for more information

Requirements:

Lavalink server

You need dev lavalink version to use our filters. You can get it by clicking Here and then, click on Lavalink.jar files How to setup
All required OS and other for lavalink server available here

Server for the bot to run

  • ⚠️nodejs v16.9.0 or newer⚠️
  • discordjs v14

Data

  • Discord bot's token You should know why you need this Get or create bot here | How to get your bot's token
  • Mongodb URI for prefix and auto resume feature. It won't work if you enter an invalid URI MongoDB
  • Your ID for eval command. please note that it's dangerous if eval is accessible to everyone
  • Ksoft API Key not required, depends on your chosen lyrics engine Click here to get
  • Genius API Key not required, depends on your chosen lyrics engine Click here to get
  • Lavalink server
    • Host url to your lavalink server
    • Password your lavalink's password. Defaults to youshallnotpass
    • Port port for your lavalink server. Defaults to 80
    • Identifier Name for your node. Defaults to it's url
    • Retry amount retry amount when the node encountered an error. Defaults to 3
    • Retry delay delay for each retry. Defaults to 1000 ms
    • Secure wether your node uses an ssl connection. Defaults to false

Available music sources:

  • youtube*

  • bandcamp*

  • soundcloud*

  • twitch*

  • vimeo*

  • http (you can use radio for it)*

  • spotify*

  • deezer*

    Note:

    • * depends on your lavalink's configuration

Configuration & Starting the bot:

With config.json

  1. First, change config.json.example's name into config.json, and fill it with the following;
{
  "TOKEN": "Your bot's token",
  "PREFIX": "?",
  "OWNERS": [
    "Your id, can be more than 1"
  ],
  "MONGODB_URI": "For database",
  "KSOFT_API_KEY": "For the lyrics. It depend on your choice",
  "GENIUS_API_KEY": "For the lyrics. It depend on your choice",
  "LYRICS_ENGINE": "There are 3 options. ksoft ; genius ; google . Google doesn't need any API",
  "NODES": [
    {
      "HOST": "Your node's host",
      "PASSWORD": "Your node's password",
      "PORT": 80,
      "IDENTIFIER": "This is node's identifier, it's all up to you",
      "RETRY_AMOUNT": 3,
      "RETRY_DELAY": 1000,
      "SECURE": false
    }
  ],
  "AUTO_RESUME_DELAY": 1500,
  "DEBUG": true,
  "LOG_USAGE": false
}
  1. Go to your console, and type cd "path to laffey's file" and install all dependencies by typing npm i
  2. You're ready to go, use node . or npm start to start the bot

With .env

  1. Create a .env file in the root directory of your project.

  2. Copy the text below and paste it in .env file and change the value with required data. ⚠️NODES in .env must be a STRINGIFIED array of node objects, or you can use normal array for nodes in config.json⚠️

    .env file

    TOKEN=TOKEN_HERE
    PREFIX=?
    OWNERS=123456789,987654321
    MONGODB_URI=mongodb+srv://blabla
    KSOFT_API_KEY=1234
    GENIUS_API_KEY=1234
    LYRICS_ENGINE=google
    AUTO_RESUME_DELAY=2000
    NODES=[{"HOST":"Your node's host","PASSWORD":"Your node's password","PORT":80,"IDENTIFIER":"This node's identifier, it's up to you","RETRY_AMOUNT":3,"RETRY_DELAY":1000,"SECURE":false}]
    DEBUG=true
    LOG_USAGE=false
    

    config.json file (you don't need this if you already provided NODES in .env)

    {
      "NODES": [
        {
          "HOST": "Your node's host",
          "PASSWORD": "Your node's password",
          "PORT": 80,
          "IDENTIFIER": "This node's identifier, it's up to you",
          "RETRY_AMOUNT": 3,
          "RETRY_DELAY": 1000,
          "SECURE": false
        }
      ]
    }
  3. Go to your console, and type cd "path to laffey's file" and install all dependencies by typing npm i

  4. You're ready to go, use node . or npm start to start the bot


    Note:

    • DEBUG is to see more info when your bot is starting or when a warning was thrown
    • LOG_USAGE is to log all command usage by user. Defaults to false because it'll be annoying
    • AUTO_RESUME_DELAY is how many ms do you want to add a delay between guild on auto resume

Screenshots




Commands

  • music

    • play plays a music from 7 different music sources
      -example: /play https://www.youtube.com/playlist?list=PL0jh16Vp3NzVjEjKbZ3pV4f15Jze5EANV

    • forceplay same like play, but this will force the player to play a specific song
      -example: /forceplay https://www.youtube.com/watch?v=dQw4w9WgXcQ

    • loop toggle track/queue loop
      -example: /loop

    • lyrics Get specific/current playing song's lyrics
      -example: /lyrics [ song's title ]

    • volume Set player's volume. 0-1000
      -example: /volume 1000

    • nowplaying see the song currently playing
      -example: /nowplaying

    • move Move song
      -example: /move 2 | /move 4 3

    • queue check all songs inside queue
      -example: /queue

    • skip skip the song
      -example: /skip

    • skipto skip to a specific song
      -example: /skipto 3

    • join Join a voice channel
      -example: /join

    • leave Leave a voice channel
      -example: /leave

    • shuffle Shuffle queue
      -example: /shuffle

    • search search song
      -example: /search never gonna give you up

    • clear Clear the queue
      -example: /clear

    • bassboost Set bassboost filter for the player
      -example: /bassboost 1 - 200

    • 24h whether the bot should leave vc when there's no user or not
      -example: /24h

    • vaporwave Set vaporwave filter for the player
      -example: /vaporwave

    • nightcore Set nightcore filter for the player
      -example: /nightcore

    • 8d Set 8d filter for the player
      -example: /8d

    • speed Set speed for the player
      -example: /speed 0-5

    • pitch Set pitch for the player
      -example: /pitch 0-5

    • reset Reset the filters
      -example: /reset

    • filters Get all filters status
      -example: /filters

    • remove Remove song from queue
      -example: /remove 3

    • previous Play previously played song
      -example: /previous

    • resume Resume the player
      -example: /resume

    • pause Pause the player
      -example: /pause

  • misc

    • ping get bot's ping
      -example: /ping

    • help Show list of available commands
      -example: /help

    • eval to evaluate code
      -example: /eval ctx.channel.send('hello')

    • invite Invite your bot to another guild
      -example: /invite

Description & About

Created at: Friday, 2 April 2021
Published at: Sunday, 11 April 2021
Laffey is Weeb-Devs 's first project. It was created by our first member aka owner, Takiyo. He really wants to make his first open source project ever. Because he wants more coding experience. In this project, he was challenged to make a project with less bugs. Hope you enjoy using Laffey!