Giter VIP home page Giter VIP logo

lavalink-musicbot's Introduction

archived now because im not interested anymore in developing/maintaining discord bots

might be un-archived in the future

thanks for those contibutors!

Lavalink-MusicBot

Music bot that uses Lavalink for its audio player.

Prerequisites

Usage

  • Rename .env.example to .env and replace those values with yours.
  • Install dependencies npm i --production or with yarn yarn --prod.
  • Running the bot npm start.

Author

lavalink-musicbot's People

Contributors

allvaa avatar alvvxl avatar dependabot-preview[bot] avatar dependabot[bot] avatar kpopdev avatar rajamoulimallareddy avatar samir-op avatar yofukashino avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lavalink-musicbot's Issues

Spotify Eror

Spotify playlist can't be played on this bot bot? Any help

[djs13] BassBoost command gives an error.

Hi there.
When attempting to use the bassboost command in the discord.js V13 branch, I get this error.

/root/dev/devmusicbot/devbot1/node_modules/discord.js/src/rest/RequestHandler.js:298
      throw new DiscordAPIError(data, res.status, request);
            ^

DiscordAPIError: Cannot send an empty message
    at RequestHandler.execute (/root/dev/devmusicbot/devbot1/node_modules/discord.js/src/rest/RequestHandler.js:298:13)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async RequestHandler.push (/root/dev/devmusicbot/devbot1/node_modules/discord.js/src/rest/RequestHandler.js:50:14)
    at async TextChannel.send (/root/dev/devmusicbot/devbot1/node_modules/discord.js/src/structures/interfaces/TextBasedChannel.js:171:15) {
  method: 'post',
  path: '/channels/874958294026952704/messages',
  code: 50006,
  httpStatus: 400,
  requestData: {
    json: {
      content: undefined,
      tts: false,
      nonce: undefined,
      embeds: undefined,
      components: undefined,
      username: undefined,
      avatar_url: undefined,
      allowed_mentions: { parse: [ 'users', 'roles' ], replied_user: undefined },
      flags: 0,
      message_reference: { message_id: '893486021407281153', fail_if_not_exists: true },
      attachments: undefined,
      sticker_ids: undefined
    },
    files: []
  }
}

How can I fix this error? It seems that the bot is trying to send an empty message?

System info:

  • OS: Ubuntu 20.04.
  • Node version: 16.10.0.
  • Git commit: 5cdbdd2

slow bot

The bot takes 3 or 4 tries to get it to play the first song...
does this normally happen or is it just me?

Attachment

Command to play an Attached file? Like any mp4 or mp3

voice channel timeout

leaves from the vc when the bot is alone in voice within a certain time (this makes confusion so I edit the comment)

leave the voice channel within a certain time after the bot is alone in the voice channel
from #49

Dose Not Work With Discord.js@Dev (V13)

error = const { Structures } = require("discord.js");
const MusicHandler = require("../structures/MusicHandler");

const Guild = Structures.get("Guild"); <-- get Is Not Defined

class MusicGuild extends Guild {
constructor(client, data) {
super(client, data);
this.music = new MusicHandler(this);
}
}

Structures.extend("Guild", () => MusicGuild);

Thank you!

Thanks for the example, now i finished my bot and i can start advert it! You are the best!

Error when playing songs

Hi there.
When playing songs in my server, sometimes I get this error and the playback stops. When using the NP command it still says playing [current song]. Playback doesn't start after doing skip command to move to the next song in the queue. Here's the error:

 {                                                                               
   op: 'event',                                                                  
   type: 'TrackExceptionEvent',                                                  
   track: 'QAAAgQIAD0JMRVNTIFlvVXIgTkFNRQAYQ2hvdUNobyBPZmZpY2lhbCBDaGFubmVsAAAAAA
 AETZAAC1had3RRTDllZ0NRAAEAK2h0dHBzOi8vd3d3LnlvdXR1YmUuY29tL3dhdGNoP3Y9WFp3dFFMOW
 VnQ1EAB3lvdXR1YmUAAAAAAAAAAA==',                                                
   error: 'Something broke when playing the track.',                             
   guildId: 'id'                                                 
 }                                                                               
 {                                                                               
   op: 'event',                                                                  
   reason: 'Abnormal closure',                                                   
   code: 1006,                                                                   
   byRemote: false,                                                              
   type: 'WebSocketClosedEvent',                                                 
   guildId: 'id'                                                 
 }                                                                               
 

How can I fix this? Also, what does this error mean?

question helppppp pls *lavasfy, sc*

    this.player
        .on("start", () => {
            this.current = this.queue.shift();
            if (this.textChannel) this.textChannel.send(util.embed().setcolor (message.guild.me.display.HexColor).setDescription(`๐ŸŽถ | Now playing **${this.current.info.title}**.`));
        }) 

embed color same as topest role
how can i define message in this music handler

Filters?

Filters for this bot? , I think you can add them using Lavalink.

bug

image
any idea why this happened?

[djs13] Playing songs gives an error.

Hi there.

I'm using the discord.js v13 branch of this bot. When trying to play songs, however I get this error

An error occured: Cannot read properties of null (reading 'getNode').

How can I fix this? There is no console output, just this message on discord.

Thanks.

system info:

  • Node V16.9.1.
  • Ubuntu 20.04
  • Lavalink dev build.

ADD premium cmds.

why don't u add filers like bass-boost, nightcore,8D, speed, 24/7, pitch, vaporwave, saved queues? commands. and connect it mongo db server if possible. @AlvvxL @Allvaa @mina9999

Bug

I get this error when the bot leaves the voice channel

{
  op: 'event',
  reason: 'Session is no longer valid.',
  code: 4006,
  byRemote: true,
  type: 'WebSocketClosedEvent',
  guildId: '678660951548887071'
}

Some features

Hey, I think that will be good to add somethings, like when only bot is on VC, bot leave VC after 15 seconds.
And why not some playlists managing by database ? @Allvaa

Music stops in the middle of playback.

Hi there.

Sometimes when playing music, it suddenly stops at the middle of the song. There are no errors that appear on the bot's console. What could be wrong here?

Just Why Senpai

The Code working Till Yestartday But Stopped working today
the code was constructor(guild) { this.guild = guild; this.queue.loop = null; if (this.current) {this.current.loop = null;} this.volume = 100; this.previous = null; this.current = null; this.queue = []; /** @type {import("discord.js").TextChannel|null} */ this.textChannel = null; }

in ./src/structures/MusicHandler.js

The Solution wil be constructor(guild) { this.guild = guild; this.volume = 100; this.previous = null; this.current = null; this.queue = []; this.queue.loop = null; if (this.current) {this.current.loop = null;} /** @type {import("discord.js").TextChannel|null} */ this.textChannel = null; }

Just move the Loop things to After this.queue = [];

Feature request

Awesome job, but I would like to see a search command. Also, can I make a public bot?

Multiple Nodes

I have Like Two Lavalink servers! So can you make the code like if one fails so it automatically shifts to the other one?
and we just have to put the info of both in the .env file nothing else. Is it Possible?

huh !

Bot is online!
events.js:180
throw err; // Unhandled 'error' event
^
Error [ERR_UNHANDLED_ERROR]: Unhandled error. ([object Object])
at PlayerManager.emit (events.js:178:17)
at LavalinkNode.onError (/rbd/pnpm-volume/3be8f7c0-b853-4d2e-877b-e447f674a5b7/node_modules/.registry.npmjs.org/discord.js-lavalink/3.0.0/node_modules/discord.js-lavalink/dist/lib/LavalinkNode.js:71:22)
at WebSocket.emit (events.js:189:13)
at ClientRequest.req.on (/rbd/pnpm-volume/3be8f7c0-b853-4d2e-877b-e447f674a5b7/node_modules/.registry.npmjs.org/ws/7.2.3/node_modules/ws/lib/websocket.js:555:15)
at ClientRequest.emit (events.js:189:13)
at Socket.socketErrorListener (_http_client.js:392:9)
at Socket.emit (events.js:189:13)
at emitErrorNT (internal/streams/destroy.js:82:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:50:3)
at process._tickCallback (internal/process/next_tick.js:63:19)

Lyrics command

The current lyrics command seems to only work if you search lyrics for a song. Is it possible to also make it find lyrics for the song playing and produce a message if lyrics are not found for the song playing? Most music bots with lyric commands use both features.

Error when starting bot.

Encountered an error in node main. Error: write EPROTO 7012:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:c:\ws\deps\openssl\openssl\ssl\record\ssl3_record.c:332:

at WriteWrap.onWriteComplete [as oncomplete] (node:internal/stream_base_commons:98:16) {

errno: -4046,
code: 'EPROTO',
syscall: 'write'
}
Node main closed. Code: 1006. Reason: .
Node main disconnected.

I've configured everything correctly, lavalink, etc. Any idea?

v3

Update this to discord.js-lavalink v3 please

Reaction Commands

I am not asking for Reaction Commands Like Hydra just wanted to tell you that I made them. If you want them then just tell me I may add a Pull request and I also added Message Purging.

Timeout?

How can we make the Bot Stay 24/7 in the VC

Need Some Features!

Can You Add Some Features Like:
1.Skipto
2.Move
3.The Bot Doesn't Leave VC immediately but Sends a Message about it.
Else Your Bot is Awesome after the Tweaks I made to My Personal Version! :D
GG/

ytsearch

Using ytsearch always return error couldn't find any songs

suggestion for New update

Hello i have suggestion for New update
if you can add time to left bot voice channel after Queue is empty

Error help mee to fix

error: (node: 6064) UnhandledPromiseReje eects nWarning: Error: connect ECONNRE! 127.0.0.1:2333

New Feature: Now Playing Progress bar

Hello. The bot is very good, but the only think what I miss is a now playing progress bar.
At what minute the music is playing / how long it will continue to play

Reaction Cmds and playing message.

Can you please make it like the bot reacts to its playing message and the users in vc can react to those reactions to get things like stop, skip, previous, pause, resume, loop, shuffle get executed? And the bot deletes its playing message if stops playing for some reason?

Node Problem

I kept getting this error: v

Logged in as BeatBoost#7651
Node main got an error: connect ECONNREFUSED localhost:3000

Dont send message on loop.

Can you make it not send the now playing message if the song is on loop of from a playlist?

Thanks so much!

Loop

Add a Variation to Loop to choose weather to Loop Single or queue

[djs13] bot keeps disconnecting and reconnecting to Lavalink server.

Hi.
This affects the djs13 branch. When ever I do npm start, I get the following from the console.

 Node main is now ready.                                                         
 Node main closed. Code: 1011. Reason: .                                         
 Node main is now ready.                                                         
 Node main closed. Code: 1011. Reason: .                                         
 Node main is now ready.                                                         
 Node main closed. Code: 1011. Reason: .                                         

My lavalink server is stable and this does not happen to the master branch of the bot. How can I fix this?

Received unexpected response from YouTube.

Can you help me? I got an error

{
  playlistInfo: {},
  exception: {
    severity: 'SUSPICIOUS',
    message: 'Received unexpected response from YouTube.'
  },
  loadType: 'LOAD_FAILED',
  tracks: []
}

When I start my bot using npm start this happens.

/bot4/src/structures/MusicClient.js:32
        this.prefix = process.env.PREFIX.toLowerCase();
                                         ^

TypeError: Cannot read property 'toLowerCase' of undefined
    at new MusicClient (/bot4/src/structures/MusicClient.js:32:42)
    at Object.<anonymous> (/bot4/src/bot.js:3:16)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:14)
    at Module.require (internal/modules/cjs/loader.js:974:19)
    at require (internal/modules/cjs/helpers.js:92:18)
    at Object.<anonymous> (/bot4/index.js:2:1)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)

Bot Command / Client Logging

It would be nice to have a universal location of commands logged, to help understand abuse when used on multiple discord servers.

Givin me errors

Cannot Read 'name' Property of Undefined.
Was working fine like a while ago

discord.js v13 compatibility

Is this bot going to be upgraded to support v13? A bunch of the functions of this bot really don't work well with the new version. It would make this absolutely amazing

i was trying to update it to v13, but i was having some issues with the search command since the collectors have changed a bit

.join command

Can you help me? I've got this so far:

const util = require("../util");

var arr = []
module.exports = {
name: "join",
aliases: ["j"],
exec: async (msg) => {
const { music } = msg.guild;
if (!msg.member.voice.channel)
return msg.channel.send(:x: You need to be in a voice channel to run this command!);
if (msg.guild.me.voice.channel && !msg.guild.me.voice.channel.equals(msg.member.voice.channel))
return msg.channel.send(:thumbsup: **I've left** ${msg.guild.me.voice.channel} **and joining** ${msg.member.voice.channel}!);
await music.leave(msg.guild);
await music.join(msg.member.voice.channel);
const missingPerms = util.missingPerms(msg.guild.me.permissionsIn(msg.member.voice.channel), ["CONNECT", "SPEAK"]);
if ((!music.player || !music.player.playing) && missingPerms.length)
return msg.channel.send(Hmm :thinking: I am unable to join you're voice chat! I am missing the permission: ${missingPerms.map(x => `${x}`).join(", ")}. Do I have access to this voice chat?);
else {
await music.join(msg.member.voice.channel);
}

}

}

How do I make it leave voice channel? I got it to join just not leave to move channel.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.