Git Product home page Git Product logo

discord-music-24-7's Introduction

discord ci-build-status open-issues-count docker-image-size docker-pulls

Discord Music 24/7

A 24/7 music bot for Discord that pauses when nobody is listening.

Requirements

To self-host this bot, you'll need the following:

  • git
  • node.js (Version 12 or higher is required.)
  • ffmpeg
  • A C/C++ compiler installed (Required to install @discordjs/opus.)

ffmpeg should be installed by default on Linux and MacOS, in case it isn't, install it with your package manager.

For Windows users:

For ffmpeg, head over to ffmpeg's official website to download the binary which will need to be added to your $PATH. If you don't know how to add folders to your $PATH, check out this guide.

For C/C++ compiler, head over to Windows-Build-Tools on NPM and install the package globally.

Installation

In order to self-host this bot, first you'll need to clone this repository.

git clone https://github.com/moonstar-x/discord-music-24-7.git

Once cloned, proceed to install the dependencies:

npm ci --only=prod

Or, if you wish to install the devDependencies:

npm install

After you have configured the bot, you can run it with:

npm start

Configuration

Inside the config folder, rename the file settings.json.example to settings.json and edit the file with you own Discord Token and other settings. If you don't have a Discord Token yet, you can see a guide on how to create it here.

Your file should look like this.

{
  "token": "YOUR_DISCORD_TOKEN",
  "prefix": "!",
  "owner_id": "123123123",
  "presence_type": "PLAYING",
  "channel_id": "123213123",
  "shuffle": true,
  "pause_on_empty": true,
  "owner_reporting": false,
  "soundcloud_client_id": "",
  "youtube_cookie": "",
  "presence_status": "{status_icon} {song_name}"
}

You may also configure these options with environment variables. The settings set with the environment variables will take higher precedence than the ones in the config JSON file.

This table contains all the configuration settings you may specify with both environment variables and the JSON config file.

Environment Variable JSON property Required Description
DISCORD_TOKEN token Yes. The bot's token.
DISCORD_PREFIX prefix No. (Defaults to: !) The bot's prefix used for the commands.
DISCORD_OWNER_ID owner_id No. (Defaults to: null) The ID of the bot's owner. This is only necessary if owner_reporting is set to true.
DISCORD_PRESENCE_TYPE presence_type No. (Defaults to: PLAYING) The presence type that will be used. Can only be one of: PLAYING, LISTENING, WATCHING, STREAMING, or COMPETING.
DISCORD_CHANNEL_ID channel_id Yes. The ID of the channel that will be auto joined by the bot.
DISCORD_SHUFFLE shuffle No. (Defaults to true) Whether the bot should shuffle the queue on start-up.
DISCORD_PAUSE_ON_EMPTY pause_on_empty No. (Defaults to true) Whether the bot should pause the music when the channel is empty.
DISCORD_OWNER_REPORTING owner_reporting No. (Defaults to false) Whether the bot should send DMs to the owner in case a command runs into an error. This is very unlikely with the amount of commands there is available.
DISCORD_SOUNDCLOUD_CLIENT_ID soundcloud_client_id Only required if queue contains a SoundCloud URL. Your SoundCloud Client ID. To find your Client ID, check out this guide.
DISCORD_YOUTUBE_COOKIE youtube_cookie Preferable to use if your bot is hosted in a network with a static public IP. This will authenticate YouTube requests with your cookie. Tries to avoid the 429 Too Many Requests error. Your YouTube cookie. To find your YouTube cookie, check out this guide.
DISCORD_PLAYING_STATUS playing_status No. (Defaults to {status_icon} {song_name}) A customized playing status. Check customizing status for more information on how to use this.
DISCORD_INTERMISSION_INTERVAL intermission_interval No. (Defaults to null) The number of songs that are played before an intermission audio is played. Check intermission audios for more information.
  • To see how to find the IDs for users or channels, you can check out this guide.
  • If you don't have a Discord token yet, you can see a guide on how to get one here.

Customizing Status

You can customize the bot's presence status message. This status is updated every time the bot plays or pauses music playback or when a new song is being played.

You can add template keys wrapped in braced {} to aggregate dynamic information to your status message.

The following keys are supported:

  • {song_name}: The current song being played.
  • {song_source}: The source of the song being played. This is added by the Provider being used and can have values such as: YT, SC, LOCAL or GENERIC.
  • {status_icon}: The icon of the status for the player. This corresponds to the stop, paused and playing icons.
  • {song_index}: The index of the current song in the queue.
  • {queue_size}: The size of the queue.

You can add how many of these you want into your status message. You can use as an example: {status_icon} [{song_index}/{queue_size}] which will turn into something like ► [3/20].

Intermission Audios

Intermission audios try to emulate ads on a radio station. The intermission_interval setting represents the number of songs that will be played before an intermission audio is played. This means that every X number of songs in the queue, an intermission audio will be played. This setting needs to be a positive number greater or equal to 1.

If you set the intermission_interval to null in your config, no intermissions will be played. If you do add an intermission_interval, the bot will generate a folder named local-intermissions and a file named intermissions.txt inside the data folder. Both of these act the same way as local-music and queue.txt, which means that intermission audios can be added as local .mp3, .opus or .m4a files inside the local-intermissions folder and audio URLs can be added into the intermissions.txt file.

If you set an intermission_interval, you will need to add at least one file inside the local-intermissions folder or add at least an audio URL inside intermissions.txt, otherwise the bot will crash.

If you don't wish to use intermissions, simply leave intermission_interval set to null.

Intermission Audio Caveats

Keep in mind that since an intermission audio is not being pulled from the music queue, the {song_index} status key will not be incremented.

Currently, the presence status message update does not differentiate between a song being played from the queue and an intermission audio being played.

Running on Docker

You can start a container with the bot's image by running:

docker run -it -e DISCORD_TOKEN="YOUR DISCORD TOKEN" -e CHANNEL_ID="YOUR CHANNEL ID" -v "/local/folder/for/data":"/opt/app/data" moonstarx/discord-music-24-7:latest

Check configuration to see which environment variables you can use.

The following volumes can be used:

  • /opt/app/config: The config folder for the bot, here you can use the settings.json file to configure the bot if you don't want to use environment variables.
  • /opt/app/data: The data folder for the bot. Here you can find the queue.txt file containing all the song URLs for the bot to play. There will also be a local-music folder to insert your MP3, OPUS or M4A files to play.

Usage

Here's a list of all the commands for the bot:

Command Alias Description
!skip !s   Skip the current song being played.
!help !h Display a help message with all the available commands.

The bot will automatically start playing music in the configured channel, it will also automatically pause when nobody is listening to the music to save bandwidth (if pause_on_empty or PAUSE_ON_EMPTY are enabled).

This bot is designed to work only on one server at a time. Inviting your bot to multiple servers will yield unexpected behavior.

The music that is played is stored in the queue.txt inside the data folder. You can add the music you want the bot to play in this file. Any links must begin with https:// or http://.

Additionally, you can play local music by inserting .mp3, .opus or or .m4a files inside the data/local-music folder. Make sure the files are properly ID3 tagged so the bot can get the artist and song name from the metadata.

Supported URLs

The bot can play music from the following URLs:

  • youtube.com
  • youtu.be
  • soundcloud.com

Playlists are not officially supported yet. You may find that they may work but generally only the first song will be pulled from them.

You can also play radio streams, as long as the stream is of the following types:

  • audio/aac
  • audio/mpeg
  • audio/ogg
  • audio/opus
  • audio/wav

Pausing/Resuming may take a bit longer with these streams.

Getting 429 Too Many Requests (YouTube)

If you're reaching 429: Too Many Requests errors in the console, then most likely you're being rate limited by YouTube because your connection is not authenticated.

Inside Configuration you'll find a parameter called youtube_cookie, this is where you'll paste the cookie extracted from your YouTube login.

  1. Head over to YouTube and login if you haven't already.
  2. Then, open the developer inspector (Ctrl+Shift+I or Cmd+Option+I) and open the Network tab. Refresh the page if you're not getting a list of requests. (Make sure to select All* in the filter tab).
  3. Look for a request named www.youtube.com and check it's headers. Under Response Headers you will find the header set-cookie, this will contain a directive called expires, keep this date in mind because your cookie will be invalidated after this date and you may need to update the settings file manually prior to this date. (Currently looking for a way to avoid this.)
  4. Inside the same request, look for the Request Headers and copy the content of the cookie header. This is the cookie that you'll need to paste inside the settings.json file or set as your YOUTUBE_COOKIE environment variable.

This solution has varied results, it works for some people, it doesn't for others.

Repl.it Support

Unfortunately, Repl.it does not support ffmpeg anymore which means that this bot will not work on this.

Author

This bot was made by moonstar-x with contributions from zackradisic (Soundcloud support).

discord-music-24-7's People

Contributors

dalejv avatar dependabot[bot] avatar moonstar-x avatar zackradisic 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  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

discord-music-24-7's Issues

- [FATAL] - Error [VOICE_CONNECTION_TIMEOUT]

🐛 Describe the Bug

When starting the bot after setting up the config it launches just fine but after 15 seconds it crashes do to not being able to establish a voice connection. In discord it connects to the voice chanel just fine.

✏️ Steps to Reproduce

  1. Go to '/discord-music-24-7'
  2. Type 'npm start'
  3. See error...

😕 Expected Behavior

it should behave like expected since I haven't done any tinkering with the code yet.

📜 Log

osprey@gameserver1:~/Documents/discord-music-24-7$ npm start

> [email protected] start
> node ./src/app.js

(12:32:38 AM) - [INFO] -  Registered Miscellaneous Commands (id: misc) command group.
(12:32:38 AM) - [INFO] -  Registered Player Commands (id: player) command group.
(12:32:38 AM) - [INFO] -  Registered help in Miscellaneous Commands.
(12:32:38 AM) - [INFO] -  Registered skip in Player Commands.
(12:32:39 AM) - [INFO] -  Refresh interval has been disabled.
(12:32:39 AM) - [INFO] -  Connected to Discord! - Ready.
(12:32:39 AM) - [INFO] -  Presence updated to: ◼ Nothing to play
(12:32:39 AM) - [INFO] -  Joined Streaming in Music streaming on radio.
(12:32:39 AM) - [INFO] -  User Music player has joined Streaming.
(12:32:54 AM) - [FATAL] -  Error [VOICE_CONNECTION_TIMEOUT]: Connection not established within 15 seconds.
    at VoiceConnection.authenticateFailed (/home/osprey/Documents/discord-music-24-7/node_modules/discord.js/src/client/voice/VoiceConnection.js:303:26)
    at /home/osprey/Documents/discord-music-24-7/node_modules/discord.js/src/client/voice/VoiceConnection.js:324:61
    at Timeout.<anonymous> (/home/osprey/Documents/discord-music-24-7/node_modules/discord.js/src/client/BaseClient.js:83:7)
    at listOnTimeout (node:internal/timers:573:17)
    at process.processTimers (node:internal/timers:514:7) {
  [Symbol(code)]: 'VOICE_CONNECTION_TIMEOUT'
}

📷 Screenshots

Screenshot (40)

❓ Other Information

  • Node Version: v20.2.0
  • The displayed / commands in the uper middle are from another bot that I used earlier.

MinigetError: Status Code: 404 - YouTube

so, i come again for a new problem, i tried to fix it myself, but i didn't find de true problem

when i start the console first show this :
image
for a little time, then show this :
image
and finaly spamm the same error again and again :
image

i don't find the problem so i come ask for your help

edit :
and i forgot to say that the bot is actually connected to the voice channel, with a gren circle around his pdp, but i don't hear a sound

How do I stop it

Loving your bot so far, but I am a pretty beginner in these. I've started with npm start and works fine, how do I stop it should I want to?

New Error

_http_outgoing.js:461
throw new ERR_INVALID_CHAR('header content', name);
^

TypeError [ERR_INVALID_CHAR]: Invalid character in header content ["Cookie"]
at ClientRequest.setHeader (_http_outgoing.js:470:3)
at new ClientRequest (_http_client.js:212:14)
at Object.request (https.js:305:10)
at doDownload (/rbd/pnpm-volume/0ec18bbe-3f27-403e-9f74-06408f6b3793/node_modules/.registry.npmjs.org/miniget/4.2.2/node_modules/miniget/dist/index.js:170:33)
at processTicksAndRejections (internal/process/task_queues.js:81:9)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: node ./src/app.js
npm ERR! Exit status 1

Add bug connectivity please

⚡ Describe the New Feature

A clear and concise description of what the new feature is.

✏️ Functionality

Describe the functionality of the new feature as a steps list (for easier understanding).

  1. Go to '...'
  2. Type '...'
  3. See error...

❓ Additional Information

If applicable, you can add anything else here.

Error happening when I start

😕 Question

When I use the start command, this error always pops up. Saw that someone had the same error, but when I tried the way that he fixed his, it still doesn't work. I'm running this on a raspberry pi 4.

❓ Additional Information

image

Não tocar música

🐛 Describe the Bug

A clear and concise description of what the bug is.

✏️ Steps to Reproduce

  1. Go to '...'
  2. Type '...'
  3. See error...

😕 Expected Behavior

A description of what you expected to get (if applicable).

📜 Log

Paste a relevant portion of the console log here.

📷 Screenshots

Paste a screenshot of the bug (if applicable).

❓ Other Information

  • Node Version: Version of the node runtime.
    Ñ toca música

The bot, sometimes, does not resume playback once I have joined the server again.

🐛 Describe the Bug

Most of the time, when I join the voice channel that has the bot sitting alone it in, the playback does not resume. I have to leave again and join for it to start playing. Yet, in the console it states that the presence has bene updated and the music has been resumed after I join. Very rarely will it properly resume playback once I join

✏️ Steps to Reproduce

1 - Get everyone to leave the voice channel
2 - Get one person to join back in
3 - The console will say music has been resumed and presence updated yet no music will be playing

😕 Expected Behavior

In terms of the expected behavior, the bot should resume playback and actually play the song.

📜 Log

(12:51:08 PM) - [INFO] -  User LlamaLoops has joined 🎧᲼24/7 lofi radio (LL).
(12:51:08 PM) - [INFO] -  Music has been resumed.
(12:51:08 PM) - [INFO] -  Presence updated to: ► nostalgic disney songs but its lofi extended version (2 hours)

📷 Screenshots

N/A

❓ Other Information

  • Node Version: Version of the node runtime.
    v16.13.2

Stream will randomly stop working after a long time.

🐛 Describe the Bug

After something like 2-3 days, the stream may randomly stop working because it seems that the websocket connection is closed without notice.

Restarting the bot will fix this issue.

✏️ Steps to Reproduce

It happens randomly which makes this really hard to debug. :/

😕 Expected Behavior

The music stream should work forever.

📜 Log

events.js:305


    throw err; // Unhandled 'error' event


    ^




Error [ERR_UNHANDLED_ERROR]: Unhandled error. (ErrorEvent {


  target: WebSocket {


    _events: [Object: null prototype] {


      open: [Function],


      message: [Function],


      close: [Function],


      error: [Function]


    },


    _eventsCount: 4,


    _maxListeners: undefined,


    _binaryType: 'nodebuffer',


    _closeCode: 1006,


    _closeFrameReceived: false,


    _closeFrameSent: false,


    _closeMessage: '',


    _closeTimer: null,


    _extensions: {},


    _protocol: '',


    _readyState: 2,


    _receiver: null,


    _sender: null,


    _socket: null,


    _bufferedAmount: 0,


    _isServer: false,


    _redirects: 0,


    _url: 'wss://santiago3716.discord.media/?v=4&encoding=json',


    _req: ClientRequest {


      _events: [Object: null prototype],


      _eventsCount: 4,


      _maxListeners: undefined,


      outputData: [],


      outputSize: 0,


      writable: true,


      _last: true,


      chunkedEncoding: false,


      shouldKeepAlive: true,


      _defaultKeepAlive: true,


      useChunkedEncodingByDefault: false,


      sendDate: false,


      _removedConnection: false,


      _removedContLen: false,


      _removedTE: false,


      _contentLength: 0,


      _hasBody: true,


      _trailer: '',


      finished: true,


      _headerSent: true,


      socket: [TLSSocket],


      connection: [TLSSocket],


      _header: 'GET /?v=4&encoding=json HTTP/1.1\r\n' +


        'Sec-WebSocket-Version: 13\r\n' +


        'Sec-WebSocket-Key: 3nWEHNgLf/4ol2wIoJ/XAQ==\r\n' +


        'Connection: Upgrade\r\n' +


        'Upgrade: websocket\r\n' +


        'Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits\r\n' +


        'Host: santiago3716.discord.media\r\n' +


        '\r\n',


      _keepAliveTimeout: 0,


      _onPendingData: [Function: noopPendingOutput],


      agent: undefined,


      socketPath: undefined,


      method: 'GET',


      insecureHTTPParser: undefined,


      path: '/?v=4&encoding=json',


      _ended: false,


      res: null,


      aborted: true,


      timeoutCb: null,


      upgradeOrConnect: false,


      parser: [HTTPParser],


      maxHeadersCount: null,


      reusedSocket: false,


      host: 'santiago3716.discord.media',


      protocol: 'https:',


      [Symbol(kCapture)]: false,


      [Symbol(kNeedDrain)]: false,


      [Symbol(corked)]: 0,


      [Symbol(kOutHeaders)]: [Object: null prototype]


    },


    [Symbol(kCapture)]: false


  },


  type: 'error',


  message: 'WebSocket was closed before the connection was established',


  error: Error: WebSocket was closed before the connection was established


      at WebSocket.close (/opt/app/node_modules/ws/lib/websocket.js:269:14)


      at VoiceWebSocket.reset (/opt/app/node_modules/discord.js/src/client/voice/networking/VoiceWebSocket.js:53:60)


      at VoiceWebSocket.shutdown (/opt/app/node_modules/discord.js/src/client/voice/networking/VoiceWebSocket.js:44:10)


      at VoiceConnection.connect (/opt/app/node_modules/discord.js/src/client/voice/VoiceConnection.js:412:42)


      at VoiceConnection.reconnect (/opt/app/node_modules/discord.js/src/client/voice/VoiceConnection.js:344:10)


      at VoiceConnection.setTokenAndEndpoint (/opt/app/node_modules/discord.js/src/client/voice/VoiceConnection.js:234:12)


      at ClientVoiceManager.onVoiceServer (/opt/app/node_modules/discord.js/src/client/voice/ClientVoiceManager.js:47:32)


      at Object.module.exports [as VOICE_SERVER_UPDATE] (/opt/app/node_modules/discord.js/src/client/websocket/handlers/VOICE_SERVER_UPDATE.js:5:16)


      at WebSocketManager.handlePacket (/opt/app/node_modules/discord.js/src/client/websocket/WebSocketManager.js:384:31)


      at WebSocketShard.onPacket (/opt/app/node_modules/discord.js/src/client/websocket/WebSocketShard.js:444:22)


})


    at VoiceConnection.emit (events.js:303:17)


    at VoiceWebSocket.<anonymous> (/opt/app/node_modules/discord.js/src/client/voice/VoiceConnection.js:422:32)


    at VoiceWebSocket.emit (events.js:314:20)


    at VoiceWebSocket.onError (/opt/app/node_modules/discord.js/src/client/voice/networking/VoiceWebSocket.js:160:10)


    at WebSocket.onError (/opt/app/node_modules/ws/lib/event-target.js:140:16)


    at WebSocket.emit (events.js:314:20)


    at abortHandshake (/opt/app/node_modules/ws/lib/websocket.js:868:15)


    at WebSocket.close (/opt/app/node_modules/ws/lib/websocket.js:269:14)


    at VoiceWebSocket.reset (/opt/app/node_modules/discord.js/src/client/voice/networking/VoiceWebSocket.js:53:60)


    at VoiceWebSocket.shutdown (/opt/app/node_modules/discord.js/src/client/voice/networking/VoiceWebSocket.js:44:10) {


  code: 'ERR_UNHANDLED_ERROR',


  context: ErrorEvent {


    target: WebSocket {


      _events: [Object: null prototype] {


        open: [Function: onOpen] { _listener: [Function: bound onOpen] },


        message: [Function: onMessage] { _listener: [Function: bound onMessage] },


        close: [Function: onClose] { _listener: [Function: bound onClose] },


        error: [Function: onError] { _listener: [Function: bound onError] }


      },


      _eventsCount: 4,


      _maxListeners: undefined,


      _binaryType: 'nodebuffer',


      _closeCode: 1006,


      _closeFrameReceived: false,


      _closeFrameSent: false,


      _closeMessage: '',


      _closeTimer: null,


      _extensions: {},


      _protocol: '',


      _readyState: 2,


      _receiver: null,


      _sender: null,


      _socket: null,


      _bufferedAmount: 0,


      _isServer: false,


      _redirects: 0,


      _url: 'wss://santiago3716.discord.media/?v=4&encoding=json',


      _req: ClientRequest {


        _events: [Object: null prototype] {


          error: [Function],


          response: [Function],


          upgrade: [Function],


          abort: [Function: bound onceWrapper] {


            listener: [Function: bound emitClose]


          }


        },


        _eventsCount: 4,


        _maxListeners: undefined,


        outputData: [],


        outputSize: 0,


        writable: true,


        _last: true,


        chunkedEncoding: false,


        shouldKeepAlive: true,


        _defaultKeepAlive: true,


        useChunkedEncodingByDefault: false,


        sendDate: false,


        _removedConnection: false,


        _removedContLen: false,


        _removedTE: false,


        _contentLength: 0,


        _hasBody: true,


        _trailer: '',


        finished: true,


        _headerSent: true,


        socket: TLSSocket {


          _tlsOptions: {


            allowHalfOpen: undefined,


            pipe: false,


            secureContext: [SecureContext],


            isServer: false,


            requestCert: true,


            rejectUnauthorized: true,


            session: undefined,


            ALPNProtocols: undefined,


            requestOCSP: undefined,


            enableTrace: undefined,


            pskCallback: undefined

�
          },


          _secureEstablished: true,


          _securePending: false,


          _newSessionPending: false,


          _controlReleased: true,


          secureConnecting: false,


          _SNICallback: null,


          servername: 'santiago3716.discord.media',


          alpnProtocol: false,


          authorized: true,


          authorizationError: null,


          encrypted: true,


          _events: [Object: null prototype] {


            close: [Array],


            end: [Array],


            newListener: [Array],


            secure: [Function: onConnectSecure],


            error: [Function: socketErrorListener],


            data: [Function: socketOnData],


            drain: [Function: ondrain]

�
          },


          _eventsCount: 7,


          connecting: false,


          _hadError: false,


          _parent: null,


          _host: 'santiago3716.discord.media',


          _readableState: ReadableState {


            objectMode: false,


            highWaterMark: 16384,


            buffer: [BufferList],


            length: 0,


            pipes: null,


            pipesCount: 0,


            flowing: true,


            ended: false,


            endEmitted: false,


            reading: true,


            sync: false,


            needReadable: true,


            emittedReadable: false,


            readableListening: false,


            resumeScheduled: false,


            emitClose: false,


            autoDestroy: false,


            destroyed: true,


            defaultEncoding: 'utf8',


            awaitDrainWriters: null,


            multiAwaitDrain: false,


            readingMore: false,


            decoder: null,


            encoding: null,


            [Symbol(kPaused)]: false

�
          },


          readable: false,


          _maxListeners: undefined,


          _writableState: WritableState {


            objectMode: false,


            highWaterMark: 16384,


            finalCalled: false,


            needDrain: false,


            ending: false,


            ended: false,


            finished: false,


            destroyed: true,


            decodeStrings: false,


            defaultEncoding: 'utf8',


            length: 0,


            writing: false,


            corked: 0,


            sync: false,


            bufferProcessing: false,


            onwrite: [Function: bound onwrite],


            writecb: null,


            writelen: 0,


            afterWriteTickInfo: null,


            bufferedRequest: null,


            lastBufferedRequest: null,


            pendingcb: 0,


            prefinished: false,


            errorEmitted: false,


            emitClose: false,


            autoDestroy: false,


            bufferedRequestCount: 0,


            corkedRequestsFree: [Object]

�
          },


          writable: false,


          allowHalfOpen: false,


          _sockname: null,


          _pendingData: null,


          _pendingEncoding: '',


          server: undefined,


          _server: null,


          ssl: null,


          _requestCert: true,


          _rejectUnauthorized: true,


          parser: HTTPParser {


            '0': [Function: parserOnHeaders],


            '1': [Function: parserOnHeadersComplete],


            '2': [Function: parserOnBody],


            '3': [Function: parserOnMessageComplete],


            '4': null,


            '5': null,


            _headers: [],


            _url: '',


            socket: [Circular],


            incoming: null,


            outgoing: [Circular],


            maxHeaderPairs: 2000,


            _consumed: false,


            onIncoming: [Function: parserOnIncomingClient],


            [Symbol(resource_symbol)]: [HTTPClientAsyncResource]

�
          },


          _httpMessage: [Circular],


          [Symbol(res)]: TLSWrap {


            _parent: [TCP],


            _parentWrap: undefined,


            _secureContext: [SecureContext],


            reading: true,


            onkeylog: [Function: onkeylog],


            onhandshakestart: [Function: noop],


            onhandshakedone: [Function],


            onocspresponse: [Function: onocspresponse],


            onnewsession: [Function: onnewsessionclient],


            onerror: [Function: onerror],


            [Symbol(owner_symbol)]: [Circular]

�
          },


          [Symbol(verified)]: true,


          [Symbol(pendingSession)]: null,


          [Symbol(asyncId)]: 4543243,


          [Symbol(kHandle)]: null,


          [Symbol(kSetNoDelay)]: false,


          [Symbol(lastWriteQueueSize)]: 0,


          [Symbol(timeout)]: null,


          [Symbol(kBuffer)]: null,


          [Symbol(kBufferCb)]: null,


          [Symbol(kBufferGen)]: null,


          [Symbol(kCapture)]: false,


          [Symbol(kBytesRead)]: 0,


          [Symbol(kBytesWritten)]: 253,


          [Symbol(connect-options)]: {


            rejectUnauthorized: true,


            ciphers: 'TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:DHE-RSA-AES256-SHA384:ECDHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA256:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!SRP:!CAMELLIA',


            checkServerIdentity: [Function: checkServerIdentity],


            minDHSize: 1024,


            protocolVersion: 13,


            maxPayload: 104857600,


            perMessageDeflate: true,


            followRedirects: false,


            maxRedirects: 10,


            createConnection: [Function: tlsConnect],


            socketPath: undefined,


            hostname: undefined,


            protocol: undefined,


            timeout: undefined,


            method: undefined,


            host: 'santiago3716.discord.media',


            path: undefined,


            port: 443,


            defaultPort: 443,


            headers: [Object],


            _defaultAgent: [Agent],


            servername: 'santiago3716.discord.media',


            singleUse: true


          }


        },


        connection: TLSSocket {


          _tlsOptions: {


            allowHalfOpen: undefined,


            pipe: false,


            secureContext: [SecureContext],


            isServer: false,


            requestCert: true,


            rejectUnauthorized: true,


            session: undefined,


            ALPNProtocols: undefined,


            requestOCSP: undefined,


            enableTrace: undefined,


            pskCallback: undefined

�
          },


          _secureEstablished: true,


          _securePending: false,


          _newSessionPending: false,


          _controlReleased: true,


          secureConnecting: false,


          _SNICallback: null,


          servername: 'santiago3716.discord.media',


          alpnProtocol: false,


          authorized: true,


          authorizationError: null,


          encrypted: true,


          _events: [Object: null prototype] {


            close: [Array],


            end: [Array],


            newListener: [Array],


            secure: [Function: onConnectSecure],


            error: [Function: socketErrorListener],


            data: [Function: socketOnData],


            drain: [Function: ondrain]

�
          },


          _eventsCount: 7,


          connecting: false,


          _hadError: false,


          _parent: null,


          _host: 'santiago3716.discord.media',


          _readableState: ReadableState {


            objectMode: false,


            highWaterMark: 16384,


            buffer: [BufferList],


            length: 0,


            pipes: null,


            pipesCount: 0,


            flowing: true,


            ended: false,


            endEmitted: false,


            reading: true,


            sync: false,


            needReadable: true,


            emittedReadable: false,


            readableListening: false,


            resumeScheduled: false,


            emitClose: false,


            autoDestroy: false,


            destroyed: true,


            defaultEncoding: 'utf8',


            awaitDrainWriters: null,


            multiAwaitDrain: false,


            readingMore: false,


            decoder: null,


            encoding: null,


            [Symbol(kPaused)]: false

�
          },


          readable: false,


          _maxListeners: undefined,


          _writableState: WritableState {


            objectMode: false,


            highWaterMark: 16384,


            finalCalled: false,


            needDrain: false,


            ending: false,


            ended: false,


            finished: false,


            destroyed: true,


            decodeStrings: false,


            defaultEncoding: 'utf8',


            length: 0,


            writing: false,


            corked: 0,


            sync: false,


            bufferProcessing: false,


            onwrite: [Function: bound onwrite],


            writecb: null,


            writelen: 0,


            afterWriteTickInfo: null,


            bufferedRequest: null,


            lastBufferedRequest: null,


            pendingcb: 0,


            prefinished: false,


            errorEmitted: false,


            emitClose: false,


            autoDestroy: false,


            bufferedRequestCount: 0,


            corkedRequestsFree: [Object]

�
          },


          writable: false,


          allowHalfOpen: false,


          _sockname: null,


          _pendingData: null,


          _pendingEncoding: '',


          server: undefined,


          _server: null,


          ssl: null,


          _requestCert: true,


          _rejectUnauthorized: true,


          parser: HTTPParser {


            '0': [Function: parserOnHeaders],


            '1': [Function: parserOnHeadersComplete],


            '2': [Function: parserOnBody],


            '3': [Function: parserOnMessageComplete],


            '4': null,


            '5': null,


            _headers: [],


            _url: '',


            socket: [Circular],


            incoming: null,


            outgoing: [Circular],


            maxHeaderPairs: 2000,


            _consumed: false,


            onIncoming: [Function: parserOnIncomingClient],


            [Symbol(resource_symbol)]: [HTTPClientAsyncResource]

�
          },


          _httpMessage: [Circular],


          [Symbol(res)]: TLSWrap {


            _parent: [TCP],


            _parentWrap: undefined,


            _secureContext: [SecureContext],


            reading: true,


            onkeylog: [Function: onkeylog],


            onhandshakestart: [Function: noop],


            onhandshakedone: [Function],


            onocspresponse: [Function: onocspresponse],


            onnewsession: [Function: onnewsessionclient],


            onerror: [Function: onerror],


            [Symbol(owner_symbol)]: [Circular]

�
          },


          [Symbol(verified)]: true,


          [Symbol(pendingSession)]: null,


          [Symbol(asyncId)]: 4543243,


          [Symbol(kHandle)]: null,


          [Symbol(kSetNoDelay)]: false,


          [Symbol(lastWriteQueueSize)]: 0,


          [Symbol(timeout)]: null,


          [Symbol(kBuffer)]: null,


          [Symbol(kBufferCb)]: null,


          [Symbol(kBufferGen)]: null,


          [Symbol(kCapture)]: false,


          [Symbol(kBytesRead)]: 0,


          [Symbol(kBytesWritten)]: 253,


          [Symbol(connect-options)]: {


            rejectUnauthorized: true,


            ciphers: 'TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:DHE-RSA-AES256-SHA384:ECDHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA256:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!SRP:!CAMELLIA',


            checkServerIdentity: [Function: checkServerIdentity],


            minDHSize: 1024,


            protocolVersion: 13,


            maxPayload: 104857600,


            perMessageDeflate: true,


            followRedirects: false,


            maxRedirects: 10,


            createConnection: [Function: tlsConnect],


            socketPath: undefined,


            hostname: undefined,


            protocol: undefined,


            timeout: undefined,


            method: undefined,


            host: 'santiago3716.discord.media',


            path: undefined,


            port: 443,


            defaultPort: 443,


            headers: [Object],


            _defaultAgent: [Agent],


            servername: 'santiago3716.discord.media',


            singleUse: true


          }


        },


        _header: 'GET /?v=4&encoding=json HTTP/1.1\r\n' +


          'Sec-WebSocket-Version: 13\r\n' +


          'Sec-WebSocket-Key: 3nWEHNgLf/4ol2wIoJ/XAQ==\r\n' +


          'Connection: Upgrade\r\n' +


          'Upgrade: websocket\r\n' +


          'Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits\r\n' +


          'Host: santiago3716.discord.media\r\n' +


          '\r\n',


        _keepAliveTimeout: 0,


        _onPendingData: [Function: noopPendingOutput],


        agent: undefined,


        socketPath: undefined,


        method: 'GET',


        insecureHTTPParser: undefined,


        path: '/?v=4&encoding=json',


        _ended: false,


        res: null,


        aborted: true,


        timeoutCb: null,


        upgradeOrConnect: false,


        parser: HTTPParser {


          '0': [Function: parserOnHeaders],


          '1': [Function: parserOnHeadersComplete],


          '2': [Function: parserOnBody],


          '3': [Function: parserOnMessageComplete],


          '4': null,


          '5': null,


          _headers: [],


          _url: '',


          socket: TLSSocket {


            _tlsOptions: [Object],


            _secureEstablished: true,


            _securePending: false,


            _newSessionPending: false,


            _controlReleased: true,


            secureConnecting: false,


            _SNICallback: null,


            servername: 'santiago3716.discord.media',


            alpnProtocol: false,


            authorized: true,


            authorizationError: null,


            encrypted: true,


            _events: [Object: null prototype],


            _eventsCount: 7,


            connecting: false,


            _hadError: false,


            _parent: null,


            _host: 'santiago3716.discord.media',


            _readableState: [ReadableState],


            readable: false,


            _maxListeners: undefined,


            _writableState: [WritableState],


            writable: false,


            allowHalfOpen: false,


            _sockname: null,


            _pendingData: null,


            _pendingEncoding: '',


            server: undefined,


            _server: null,


            ssl: null,


            _requestCert: true,


            _rejectUnauthorized: true,


            parser: [Circular],


            _httpMessage: [Circular],


            [Symbol(res)]: [TLSWrap],


            [Symbol(verified)]: true,


            [Symbol(pendingSession)]: null,


            [Symbol(asyncId)]: 4543243,


            [Symbol(kHandle)]: null,


            [Symbol(kSetNoDelay)]: false,


            [Symbol(lastWriteQueueSize)]: 0,


            [Symbol(timeout)]: null,


            [Symbol(kBuffer)]: null,


            [Symbol(kBufferCb)]: null,


            [Symbol(kBufferGen)]: null,


            [Symbol(kCapture)]: false,


            [Symbol(kBytesRead)]: 0,


            [Symbol(kBytesWritten)]: 253,


            [Symbol(connect-options)]: [Object]

�
          },


          incoming: null,


          outgoing: [Circular],


          maxHeaderPairs: 2000,


          _consumed: false,


          onIncoming: [Function: parserOnIncomingClient],


          [Symbol(resource_symbol)]: HTTPClientAsyncResource {


            type: 'HTTPINCOMINGMESSAGE',


            req: [Circular]


          }


        },


        maxHeadersCount: null,


        reusedSocket: false,


        host: 'santiago3716.discord.media',


        protocol: 'https:',


        [Symbol(kCapture)]: false,


        [Symbol(kNeedDrain)]: false,


        [Symbol(corked)]: 0,


        [Symbol(kOutHeaders)]: [Object: null prototype] {


          'sec-websocket-version': [ 'Sec-WebSocket-Version', 13 ],


          'sec-websocket-key': [ 'Sec-WebSocket-Key', 'SNIPPED' ],


          connection: [ 'Connection', 'Upgrade' ],


          upgrade: [ 'Upgrade', 'websocket' ],


          'sec-websocket-extensions': [


            'Sec-WebSocket-Extensions',


            'permessage-deflate; client_max_window_bits'

�
          ],


          host: [ 'Host', 'santiago3716.discord.media' ]

�


}


      },


      [Symbol(kCapture)]: false


    },


    type: 'error',


    message: 'WebSocket was closed before the connection was established',


    error: Error: WebSocket was closed before the connection was established


        at WebSocket.close (/opt/app/node_modules/ws/lib/websocket.js:269:14)


        at VoiceWebSocket.reset (/opt/app/node_modules/discord.js/src/client/voice/networking/VoiceWebSocket.js:53:60)


        at VoiceWebSocket.shutdown (/opt/app/node_modules/discord.js/src/client/voice/networking/VoiceWebSocket.js:44:10)


        at VoiceConnection.connect (/opt/app/node_modules/discord.js/src/client/voice/VoiceConnection.js:412:42)


        at VoiceConnection.reconnect (/opt/app/node_modules/discord.js/src/client/voice/VoiceConnection.js:344:10)


        at VoiceConnection.setTokenAndEndpoint (/opt/app/node_modules/discord.js/src/client/voice/VoiceConnection.js:234:12)


        at ClientVoiceManager.onVoiceServer (/opt/app/node_modules/discord.js/src/client/voice/ClientVoiceManager.js:47:32)


        at Object.module.exports [as VOICE_SERVER_UPDATE] (/opt/app/node_modules/discord.js/src/client/websocket/handlers/VOICE_SERVER_UPDATE.js:5:16)


        at WebSocketManager.handlePacket (/opt/app/node_modules/discord.js/src/client/websocket/WebSocketManager.js:384:31)


        at WebSocketShard.onPacket (/opt/app/node_modules/discord.js/src/client/websocket/WebSocketShard.js:444:22)


  }


}


npm ERR! code ELIFECYCLE


npm ERR! errno 1


npm ERR! [email protected] start: `node ./src/app.js`


npm ERR! Exit status 1

�


 


npm ERR! Failed at the [email protected] start script.


npm ERR! This is probably not a problem with npm. There is likely additional logging output above.




npm ERR! A complete log of this run can be found in:


npm ERR!     /root/.npm/_logs/2021-09-08T19_24_42_445Z-debug.log

📷 Screenshots

Paste a screenshot of the bug (if applicable).

❓ Other Information

  • Node Version: 12.20.0

Add a custom presence status message.

⚡ Describe the New Feature

A way to specify in the config a custom presence status message. It should support templates to aggregate:

  1. The name of the song currently played.
  2. The play/pause icon.
  3. The index of the current song being played.
  4. The max number of songs in the queue.

bot cant play anything

(7:01:22 PM) - [ERROR] - Error: input stream: Status code: 429

at StreamDispatcher.dispatcher.on.err (/app/src/app.js:74:14)

at StreamDispatcher.emit (events.js:194:15)

at streamError (/rbd/pnpm-volume/fe128fbf-e057-4865-9abc-dcd71a24cf28/node_modules/.github.com/discordjs/discord.js/ea9e1441905e67e2627a6f5e80a8d989d01376c5/node_modules/discord.js/src/client/voice/dispatcher/StreamDispatcher.js:88:14)

at PassThrough.StreamDispatcher.streams.input.on.err (/rbd/pnpm-volume/fe128fbf-e057-4865-9abc-dcd71a24cf28/node_modules/.github.com/discordjs/discord.js/ea9e1441905e67e2627a6f5e80a8d989d01376c5/node_modules/discord.js/src/client/voice/dispatcher/StreamDispatcher.js:94:67)

at PassThrough.emit (events.js:189:13)

at ytdl.getInfo (/rbd/pnpm-volume/fe128fbf-e057-4865-9abc-dcd71a24cf28/node_modules/.registry.npmjs.org/ytdl-core/0.29.7/node_modules/ytdl-core/lib/index.js:19:14)

at fn (/rbd/pnpm-volume/fe128fbf-e057-4865-9abc-dcd71a24cf28/node_modules/.registry.npmjs.org/ytdl-core/0.29.7/node_modules/ytdl-core/lib/info.js:370:25)

at exports.getBasicInfo (/rbd/pnpm-volume/fe128fbf-e057-4865-9abc-dcd71a24cf28/node_modules/.registry.npmjs.org/ytdl-core/0.29.7/node_modules/ytdl-core/lib/info.js:212:21)

at fn (/rbd/pnpm-volume/fe128fbf-e057-4865-9abc-dcd71a24cf28/node_modules/.registry.npmjs.org/ytdl-core/0.29.7/node_modules/ytdl-core/lib/info.js:370:25)

This Error son't stop apering.

_http_outgoing.js:461
throw new ERR_INVALID_CHAR('header content', name);
^

TypeError [ERR_INVALID_CHAR]: Invalid character in header content ["Cookie"]
at ClientRequest.setHeader (_http_outgoing.js:470:3)
at new ClientRequest (_http_client.js:212:14)
at Object.request (https.js:305:10)
at doDownload (/rbd/pnpm-volume/0ec18bbe-3f27-403e-9f74-06408f6b3793/node_modules/.registry.npmjs.org/miniget/4.2.2/node_modules/miniget/dist/index.js:170:33)
at processTicksAndRejections (internal/process/task_queues.js:81:9)

It dosen't plaay music..

I've deployed the bot on heroku and have setup all the requirements such as Procfile which declares worker as npm start but I don't know why it is not playing music...I does connect to voice channel but don't play music :(

Bot skipping song that didn't end.

🐛

A clear and concise description of what the bug is.
The bot stops playing and gives an error, then skips song.

✏️ Steps to Reproduce

  1. Play the queue
  2. Wait
  3. It happens

😕 Expected Behavior

It skips to next song.

A description of what you expected to get (if applicable).
It should continue playing it as normal.

📜 Log

(1:50:50 PM) - [ERROR] -  Error: aborted
    at connResetException (node:internal/errors:692:14)
    at TLSSocket.socketCloseListener (node:_http_client:402:19)
    at TLSSocket.emit (node:events:539:35)
    at node:net:688:12
    at TCP.done (node:_tls_wrap:582:7) {
  code: 'ECONNRESET'
}

📷 Screenshots

Paste a screenshot of the bug (if applicable).

❓ Other Information

  • Node Version: v17.

I received this error when starting the Bot on Glitch.

(3:48:34 PM) - [FATAL] - VoiceChannelError: Something went wrong when trying to look for the channel I was supposed to join.
at Player.initialize (/app/src/classes/Player.js:84:13)
at processTicksAndRejections (internal/process/task_queues.js:88:5) {
name: 'VoiceChannelError'
}

Multi-server support

⚡ Describe the New Feature

Add support for multiple servers, maybe a persistent data store is necessary to keep the connection channel per guild.

This also means new commands to set the playing channel.

Crash when voice connection is lost.

🐛 Describe the Bug

After having the bot run for 2 days on my server, it completely crashes

✏️ Steps to Reproduce

  1. Turn of pause music on empty server
  2. Run bot for multiple days
  3. See error...

😕 Expected Behavior

The bot should not be crashing, its a 24/7 bot. Its gives issues such as code: 'ERR_UNHANDLED_ERROR', Error: getaddrinfo ENOTFOUND sydney4015.discord.media, and type: 'error', message: 'getaddrinfo ENOTFOUND sydney4015.discord.media',

📜 Log

node:events:381
    throw err; // Unhandled 'error' event
    ^

Error [ERR_UNHANDLED_ERROR]: Unhandled error. (ErrorEvent {
  target: WebSocket {
    _events: [Object: null prototype] {
      open: [Function],
      message: [Function],
      close: [Function],
      error: [Function]
    },
    _eventsCount: 4,
    _maxListeners: undefined,
    _binaryType: 'nodebuffer',
    _closeCode: 1006,
    _closeFrameReceived: false,
    _closeFrameSent: false,
    _closeMessage: '',
    _closeTimer: null,
    _extensions: {},
    _protocol: '',
    _readyState: 2,
    _receiver: null,
    _sender: null,
    _socket: null,
    _bufferedAmount: 0,
    _isServer: false,
    _redirects: 0,
    _url: 'wss://sydney4015.discord.media/?v=4&encoding=json',
    _req: null,
    [Symbol(kCapture)]: false
  },
  type: 'error',
  message: 'getaddrinfo ENOTFOUND sydney4015.discord.media',
  error: Error: getaddrinfo ENOTFOUND sydney4015.discord.media
      at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:71:26) {
    errno: -3008,
    code: 'ENOTFOUND',
    syscall: 'getaddrinfo',
    hostname: 'sydney4015.discord.media'
  }
})
    at new NodeError (node:internal/errors:371:5)
    at VoiceConnection.emit (node:events:379:17)
    at VoiceWebSocket.<anonymous> (C:\Users\User\Desktop\DC bot\project\discord-music-24-7\node_modules\discord.js\src\client\voice\VoiceConnection.js:422:32)
    at VoiceWebSocket.emit (node:events:390:28)
    at VoiceWebSocket.onError (C:\Users\User\Desktop\DC bot\project\discord-music-24-7\node_modules\discord.js\src\client\voice\networking\VoiceWebSocket.js:160:10)
    at WebSocket.onError (C:\Users\User\Desktop\DC bot\project\discord-music-24-7\node_modules\ws\lib\event-target.js:140:16)
    at WebSocket.emit (node:events:390:28)
    at emitErrorAndClose (C:\Users\User\Desktop\DC bot\project\discord-music-24-7\node_modules\ws\lib\websocket.js:835:13)
    at ClientRequest.<anonymous> (C:\Users\User\Desktop\DC bot\project\discord-music-24-7\node_modules\ws\lib\websocket.js:697:5)
    at ClientRequest.emit (node:events:390:28) {
  code: 'ERR_UNHANDLED_ERROR',
  context: ErrorEvent {
    target: WebSocket {
      _events: [Object: null prototype] {
        open: [Function: onOpen] { _listener: [Function: bound onOpen] },
        message: [Function: onMessage] { _listener: [Function: bound onMessage] },
        close: [Function: onClose] { _listener: [Function: bound onClose] },
        error: [Function: onError] { _listener: [Function: bound onError] }
      },
      _eventsCount: 4,
      _maxListeners: undefined,
      _binaryType: 'nodebuffer',
      _closeCode: 1006,
      _closeFrameReceived: false,
      _closeFrameSent: false,
      _closeMessage: '',
      _closeTimer: null,
      _protocol: '',
      _readyState: 2,
      _receiver: null,
      _sender: null,
      _socket: null,
      _bufferedAmount: 0,
      _isServer: false,
      _redirects: 0,
      _url: 'wss://sydney4015.discord.media/?v=4&encoding=json',
      _req: null,
      [Symbol(kCapture)]: false
    },
    type: 'error',
    message: 'getaddrinfo ENOTFOUND sydney4015.discord.media',
    error: Error: getaddrinfo ENOTFOUND sydney4015.discord.media
        at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:71:26) {
      errno: -3008,
      code: 'ENOTFOUND',
      syscall: 'getaddrinfo',
      hostname: 'sydney4015.discord.media'
    }
  }
}

📷 Screenshots

Paste a screenshot of the bug (if applicable).

❓ Other Information

  • v16.13.2

Skip songs

I need a command to skip songs. The only way I have gotten it to skip a song and that is to make the bot crash and wait for it to restart. Sometime it would play the same songs.

EPIPE Error

Hi, I added own youtube links to queue.txt
After run this bot its connected on the channel, but with EPIPE error. When I added back your deafult youtube links there, it worked without this error. What do i have to do to make it work? Thanks

Error: write EPIPE
at afterWriteDispatched (node:internal/stream_base_commons:164:15)
at writeGeneric (node:internal/stream_base_commons:155:3)
at Socket._writeGeneric (node:net:795:11)
at Socket._write (node:net:807:8)
at writeOrBuffer (node:internal/streams/writable:389:12)
at _write (node:internal/streams/writable:330:10)
at Socket.Writable.write (node:internal/streams/writable:334:10)
at PassThrough.ondata (node:internal/streams/readable:754:22)
at PassThrough.emit (node:events:390:28)
at PassThrough.Readable.read (node:internal/streams/readable:527:10) {
errno: -4047,
code: 'EPIPE',
syscall: 'write'

Error input Stream

[ERROR] -  Error: input stream: Unable to retrieve video metadata                                                                            
   at getJSONWatchPage (/home/pi0/discord-music-24-7/node_modules/ytdl-core/lib/info.js:184:11)                                                          
   at runMicrotasks (<anonymous>)
   at processTicksAndRejections (internal/process/task_queues.js:97:5)
   at async exports.getBasicInfo (/home/pi0/discord-music-24-7/node_modules/ytdl-core/lib/info.js:34:14)                                                 
   at async Map.getOrSet (/home/pi0/discord-music-24-7/node_modules/ytdl-core/lib/cache.js:24:19)                                                        
   at async exports.getInfo (/home/pi0/discord-music-24-7/node_modules/ytdl-core/lib/info.js:252:14)                                                     
   at async Map.getOrSet (/home/pi0/discord-music-24-7/node_modules/ytdl-core/lib/cache.js:24:19)                                  

i am having this issue, i do not know why, is the first time that i try to host/run a discord bot so i do know nothing about.

The bot randomly stops playing when using Docker

🐛 Describe the Bug

I have started running this bot on Docker and I found that sometimes it just stops playing completely. This time it happened again and simply said the bot has excited with code 0. As if the bot finished doing what it needed to do. It did not restart itself which it should on Docker

✏️ Steps to Reproduce

  1. Run bot on Docker
  2. Wait a while
  3. Playback stops and does not restart

😕 Expected Behavior

A 24/7 bot that restarts when crashes

📜 Log

'dicord-music-bot-24-7 excited with code 0'

📷 Screenshots

Paste a screenshot of the bug (if applicable).

❓ Other Information

  • Node Version: Version of the node runtime.

Error on Heruko

Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
Could u help me to solve this error?
Tks.

Update to Djs.13/Djs.14

⚡ Describe the New Feature

The bot has no Slash commands currently which are technically the way to go now for bots. This means the bot needs to use the privileged message content intent for now.

I'm afraid I can only start working on this until January 2023 because of college and work.

Fear not, this project is not abandoned but it is on hold until then.

Help assistance needed....

Is there a possible way for me to make the bot not pause music ?

If yes can you please guide me......thanks!
what should I edit in the code to make this possible.

Add support for intermission audios between X amount of songs played.

⚡ Describe the New Feature

This would be to make the music bot feel a bit more like a radio.

Basically add the ability to play a certain audio clip every X songs played.

The audios could be audio files or URLs, so something like a separate Queue should be added to the Player for these audios.

Repl.it supported

🐛 Describe the Bug

FFmpeg on repl.it is supported. FFmpeg is not supported, but ffmpeg-static is alternatives of ffmpeg.

A clear and concise description of what the bug is.

✏️ Steps to Reproduce

  1. Go to '...'
  2. Type '...'
  3. See error...

😕 Expected Behavior

A description of what you expected to get (if applicable).

📜 Log

Paste a relevant portion of the console log here.

📷 Screenshots

Paste a screenshot of the bug (if applicable).

❓ Other Information

  • Node Version: Version of the node runtime.

error (avconv missing file)

when i type "npm start" in my cmd the bot connect to the channel but plays nothing, and the cmd report non-stop that there's a missing file, the files is "avconv" what should be in the "ffmpeg" folder but there is no such file so i don't know what to do, if someone could help me 🤷‍♂️

here a screen of the error :
image

thank you for your help, have a nice day and please excuse my english, i'm french

Error

It keeps repeating that ffmpeg isnt installed idk how to fix it even tho i have it installed

add stage connectivity please

🐛 Describe the Bug

A clear and concise description of what the bug is.

✏️ Steps to Reproduce

  1. Go to '...'
  2. Type '...'
  3. See error...

😕 Expected Behavior

A description of what you expected to get (if applicable).

📜 Log

Paste a relevant portion of the console log here.

📷 Screenshots

Paste a screenshot of the bug (if applicable).

❓ Other Information

  • Node Version: Version of the node runtime.

Now playing.

hello sir! i'm new here to creating my own bot. so randomly i find this project and i'm so excited with this project.
And thank you very much.
so, i have a question. it is possible change the now playing from the status to channelmessage?
if dont mind, can you tell me how to do that?
so its okay if you dont wanna to anwser my question.

THANK YOU :D

Music does not resume after it has been paused for a long time.

hello there, sorry for bothering you.
i found an issue, when the bot pausing music for 2 hours and then when someone is joining to the voice chat, the bot wont resuming the playing music until i restart the dyno from heroku.
do you have any idea how to fix it?

image
image
np: sorry if my english not so good, i hope you understand what i say xD

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.