Giter VIP home page Giter VIP logo

discord.js-music's People

Contributors

koenie06 avatar

Stargazers

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

Watchers

 avatar

discord.js-music's Issues

Music event "requester" not working

When I use the requester thing for like Requested by ${requester.tag}
I get this error
TypeError: Cannot read properties of undefined (reading 'tag') at EventEmitter.<anonymous> (/home/runner/Harmony-Beta/events/musicEvents.js:26:40) at EventEmitter.emit (node:events:390:28) at Object.exports.play (/home/runner/Harmony-Beta/node_modules/@koenie06/discord.js-music/src/index.js:102:19) at runMicrotasks (<anonymous>) at processTicksAndRejections (node:internal/process/task_queues:96:5)
and when i try to log it it just says undefined

Music skips and throws an error randomly

Logs:

AudioPlayerError: aborted
    at connResetException (node:internal/errors:691:14)
    at TLSSocket.socketCloseListener (node:_http_client:407:19)
    at TLSSocket.emit (node:events:402:35)
    at node:net:687:12
    at TCP.done (node:_tls_wrap:580:7) {
  resource: AudioResource {
    playbackDuration: 57500,
    started: true,
    silenceRemaining: -1,
    edges: [ [Object], [Object], [Object] ],
    playStream: Encoder {
      _readableState: [ReadableState],
      _events: [Object: null prototype],
      _eventsCount: 5,
      _maxListeners: undefined,
      _writableState: [WritableState],
      allowHalfOpen: true,
      encoder: null,
      _options: [Object],
      _required: 3840,
      _buffer: null,
      [Symbol(kCapture)]: false,
      [Symbol(kCallback)]: [Function: bound onwrite]
    },
    metadata: null,
    silencePaddingFrames: 5,
    volume: VolumeTransformer {
      _readableState: [ReadableState],
      _events: [Object: null prototype],
      _eventsCount: 5,
      _maxListeners: undefined,
      _writableState: [WritableState],
      allowHalfOpen: true,
      _readInt: [Function (anonymous)],
      _writeInt: [Function (anonymous)],
      _bits: 16,
      _bytes: 2,
      _extremum: 32768,
      volume: 1,
      _chunk: null,
      [Symbol(kCapture)]: false,
      [Symbol(kCallback)]: [Function: bound onwrite]
    },
    encoder: Encoder {
      _readableState: [ReadableState],
      _events: [Object: null prototype],
      _eventsCount: 5,
      _maxListeners: undefined,
      _writableState: [WritableState],
      allowHalfOpen: true,
      encoder: null,
      _options: [Object],
      _required: 3840,
      _buffer: null,
      [Symbol(kCapture)]: false,
      [Symbol(kCallback)]: [Function: bound onwrite]
    },
    audioPlayer: AudioPlayer {
      _events: [Object: null prototype],
      _eventsCount: 2,
      _maxListeners: undefined,
      subscribers: [Array],
      _state: [Object],
      behaviors: [Object],
      debug: [Function (anonymous)],
      [Symbol(kCapture)]: false
    }
  }
}
AudioPlayerError: aborted
    at connResetException (node:internal/errors:691:14)
    at TLSSocket.socketCloseListener (node:_http_client:407:19)
    at TLSSocket.emit (node:events:402:35)
    at node:net:687:12
    at TCP.done (node:_tls_wrap:580:7) {
  resource: AudioResource {
    playbackDuration: 57500,
    started: true,
    silenceRemaining: -1,
    edges: [ [Object], [Object], [Object] ],
    playStream: Encoder {
      _readableState: [ReadableState],
      _events: [Object: null prototype],
      _eventsCount: 5,
      _maxListeners: undefined,
      _writableState: [WritableState],
      allowHalfOpen: true,
      encoder: null,
      _options: [Object],
      _required: 3840,
      _buffer: null,
      [Symbol(kCapture)]: false,
      [Symbol(kCallback)]: [Function: bound onwrite]
    },
    metadata: null,
    silencePaddingFrames: 5,
    volume: VolumeTransformer {
      _readableState: [ReadableState],
      _events: [Object: null prototype],
      _eventsCount: 5,
      _maxListeners: undefined,
      _writableState: [WritableState],
      allowHalfOpen: true,
      _readInt: [Function (anonymous)],
      _writeInt: [Function (anonymous)],
      _bits: 16,
      _bytes: 2,
      _extremum: 32768,
      volume: 1,
      _chunk: null,
      [Symbol(kCapture)]: false,
      [Symbol(kCallback)]: [Function: bound onwrite]
    },
    encoder: Encoder {
      _readableState: [ReadableState],
      _events: [Object: null prototype],
      _eventsCount: 5,
      _maxListeners: undefined,
      _writableState: [WritableState],
      allowHalfOpen: true,
      encoder: null,
      _options: [Object],
      _required: 3840,
      _buffer: null,
      [Symbol(kCapture)]: false,
      [Symbol(kCallback)]: [Function: bound onwrite]
    },
    audioPlayer: AudioPlayer {
      _events: [Object: null prototype],
      _eventsCount: 2,
      _maxListeners: undefined,
      subscribers: [Array],
      _state: [Object],
      behaviors: [Object],
      debug: [Function (anonymous)],
      [Symbol(kCapture)]: false
    }
  }
}

Impossible to install npm package

npm ERR! code 1
npm ERR! path C:\Users\luiza\Downloads\Coding\Musica\node_modules@discordjs\opus
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node-pre-gyp install --fallback-to-build
npm ERR! Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\luiza\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\luiza\Downloads\Coding\Musica\node_modules@discordjs\opus\prebuild\node-v102-napi-v3-win32-x64-unknown-unknown\opus.node --module_name=opus --module_path=C:\Users\luiza\Downloads\Coding\Musica\node_modules@discordjs\opus\prebuild\node-v102-napi-v3-win32-x64-unknown-unknown --napi_version=8 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using [email protected]
npm ERR! node-pre-gyp info using [email protected] | win32 | x64
npm ERR! node-pre-gyp info check checked for "C:\Users\luiza\Downloads\Coding\Musica\node_modules@discordjs\opus\prebuild\node-v102-napi-v3-win32-x64-unknown-unknown\opus.node" (not found)
npm ERR! node-pre-gyp http GET https://github.com/discordjs/opus/releases/download/v0.6.0/opus-v0.6.0-node-v102-napi-v3-win32-x64-unknown-unknown.tar.gz
npm ERR! node-pre-gyp ERR! install response status 404 Not Found on https://github.com/discordjs/opus/releases/download/v0.6.0/opus-v0.6.0-node-v102-napi-v3-win32-x64-unknown-unknown.tar.gz
npm ERR! node-pre-gyp WARN Pre-built binaries not installable for @discordjs/[email protected] and [email protected] (node-v102 ABI, unknown) (falling back to source compile with node-gyp)
npm ERR! node-pre-gyp WARN Hit error response status 404 Not Found on https://github.com/discordjs/opus/releases/download/v0.6.0/opus-v0.6.0-node-v102-napi-v3-win32-x64-unknown-unknown.tar.gz
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | win32 | x64
npm ERR! gyp info ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | win32 | x64
npm ERR! gyp ERR! find Python
npm ERR! gyp ERR! find Python Python is not set from command line or npm configuration
npm ERR! gyp ERR! find Python Python is not set from environment variable PYTHON
npm ERR! gyp ERR! find Python checking if "python3" can be used
npm ERR! gyp ERR! find Python - "python3" is not in PATH or produced an error
npm ERR! gyp ERR! find Python checking if "python" can be used
npm ERR! gyp ERR! find Python - "python" is not in PATH or produced an error
npm ERR! gyp ERR! find Python checking if Python is C:\Users\luiza\AppData\Local\Programs\Python\Python39\python.exe
npm ERR! gyp ERR! find Python - "C:\Users\luiza\AppData\Local\Programs\Python\Python39\python.exe" could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python39\python.exe
npm ERR! gyp ERR! find Python - "C:\Program Files\Python39\python.exe" could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Users\luiza\AppData\Local\Programs\Python\Python39-32\python.exe
npm ERR! gyp ERR! find Python - "C:\Users\luiza\AppData\Local\Programs\Python\Python39-32\python.exe" could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python39-32\python.exe
npm ERR! gyp ERR! find Python - "C:\Program Files\Python39-32\python.exe" could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python39-32\python.exe
npm ERR! gyp ERR! find Python - "C:\Program Files (x86)\Python39-32\python.exe" could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Users\luiza\AppData\Local\Programs\Python\Python38\python.exe
npm ERR! gyp ERR! find Python - "C:\Users\luiza\AppData\Local\Programs\Python\Python38\python.exe" could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python38\python.exe
npm ERR! gyp ERR! find Python - "C:\Program Files\Python38\python.exe" could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Users\luiza\AppData\Local\Programs\Python\Python38-32\python.exe
npm ERR! gyp ERR! find Python - "C:\Users\luiza\AppData\Local\Programs\Python\Python38-32\python.exe" could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python38-32\python.exe
npm ERR! gyp ERR! find Python - "C:\Program Files\Python38-32\python.exe" could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python38-32\python.exe
npm ERR! gyp ERR! find Python - "C:\Program Files (x86)\Python38-32\python.exe" could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Users\luiza\AppData\Local\Programs\Python\Python37\python.exe
npm ERR! gyp ERR! find Python - "C:\Users\luiza\AppData\Local\Programs\Python\Python37\python.exe" could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python37\python.exe
npm ERR! gyp ERR! find Python - "C:\Program Files\Python37\python.exe" could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Users\luiza\AppData\Local\Programs\Python\Python37-32\python.exe
npm ERR! gyp ERR! find Python - "C:\Users\luiza\AppData\Local\Programs\Python\Python37-32\python.exe" could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python37-32\python.exe
npm ERR! gyp ERR! find Python - "C:\Program Files\Python37-32\python.exe" could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python37-32\python.exe
npm ERR! gyp ERR! find Python - "C:\Program Files (x86)\Python37-32\python.exe" could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Users\luiza\AppData\Local\Programs\Python\Python36\python.exe
npm ERR! gyp ERR! find Python - "C:\Users\luiza\AppData\Local\Programs\Python\Python36\python.exe" could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python36\python.exe
npm ERR! gyp ERR! find Python - "C:\Program Files\Python36\python.exe" could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Users\luiza\AppData\Local\Programs\Python\Python36-32\python.exe
npm ERR! gyp ERR! find Python - "C:\Users\luiza\AppData\Local\Programs\Python\Python36-32\python.exe" could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python36-32\python.exe
npm ERR! gyp ERR! find Python - "C:\Program Files\Python36-32\python.exe" could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python36-32\python.exe
npm ERR! gyp ERR! find Python - "C:\Program Files (x86)\Python36-32\python.exe" could not be run
npm ERR! gyp ERR! find Python checking if the py launcher can be used to find Python 3
npm ERR! gyp ERR! find Python - "py.exe" is not in PATH or produced an error
npm ERR! gyp ERR! find Python
npm ERR! gyp ERR! find Python **********************************************************
npm ERR! gyp ERR! find Python You need to install the latest version of Python.
npm ERR! gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
npm ERR! gyp ERR! find Python you can try one of the following options:
npm ERR! gyp ERR! find Python - Use the switch --python="C:\Path\To\python.exe"
npm ERR! gyp ERR! find Python (accepted by both node-gyp and npm)
npm ERR! gyp ERR! find Python - Set the environment variable PYTHON
npm ERR! gyp ERR! find Python - Set the npm configuration variable python:
npm ERR! gyp ERR! find Python npm config set python "C:\Path\To\python.exe"
npm ERR! gyp ERR! find Python For more information consult the documentation at:
npm ERR! gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
npm ERR! gyp ERR! find Python **********************************************************
npm ERR! gyp ERR! find Python
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Could not find any Python installation to use
npm ERR! gyp ERR! stack at PythonFinder.fail (C:\Users\luiza\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-python.js:330:47)
npm ERR! gyp ERR! stack at PythonFinder.runChecks (C:\Users\luiza\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-python.js:159:21)
npm ERR! gyp ERR! stack at PythonFinder. (C:\Users\luiza\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-python.js:228:18)
npm ERR! gyp ERR! stack at PythonFinder.execFileCallback (C:\Users\luiza\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-python.js:294:16)
npm ERR! gyp ERR! stack at exithandler (node:child_process:404:5)
npm ERR! gyp ERR! stack at ChildProcess.errorhandler (node:child_process:416:5)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:390:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:288:12)
npm ERR! gyp ERR! stack at onErrorNT (node:internal/child_process:475:16)
npm ERR! gyp ERR! stack at processTicksAndRejections (node:internal/process/task_queues:83:21)
npm ERR! gyp ERR! System Windows_NT 10.0.19044
npm ERR! gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\luiza\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\Users\luiza\Downloads\Coding\Musica\node_modules\@discordjs\opus\prebuild\node-v102-napi-v3-win32-x64-unknown-unknown\opus.node" "--module_name=opus" "--module_path=C:\Users\luiza\Downloads\Coding\Musica\node_modules\@discordjs\opus\prebuild\node-v102-napi-v3-win32-x64-unknown-unknown" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=3" "--node_napi_label=napi-v3"
npm ERR! gyp ERR! cwd C:\Users\luiza\Downloads\Coding\Musica\node_modules@discordjs\opus
npm ERR! gyp ERR! node -v v17.0.1
npm ERR! gyp ERR! node-gyp -v v8.4.0
npm ERR! gyp ERR! not ok
npm ERR! node-pre-gyp ERR! build error
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\luiza\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\luiza\Downloads\Coding\Musica\node_modules@discordjs\opus\prebuild\node-v102-napi-v3-win32-x64-unknown-unknown\opus.node --module_name=opus --module_pa_napi_label=napi-v3' (1)
npm ERR! node-pre-gyp ERR! stack at ChildProcess. (C:\Users\luiza\Downloads\Coding\Musica\node_modules@discordjs\node-pre-gyp\lib\util\compile.js:85:20)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.emit (node:events:390:28)
npm ERR! node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1062:16)
npm ERR! node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
npm ERR! node-pre-gyp ERR! System Windows_NT 10.0.19044
npm ERR! node-pre-gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\luiza\Downloads\Coding\Musica\node_modules\@discordjs\node-pre-gyp\bin\node-pre-gyp" "install" "--fallback-to-build"
npm ERR! node-pre-gyp ERR! cwd C:\Users\luiza\Downloads\Coding\Musica\node_modules@discordjs\opus
npm ERR! node-pre-gyp ERR! node -v v17.0.1
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v0.4.2
npm ERR! node-pre-gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\luiza\AppData\Local\npm-cache_logs\2021-11-23T21_44_50_103Z-debug.log

Bot randomly leaves the channel, stops playing and i get this in console???

Hello,
Im using your module to play music on my bot and everything works fine except.
For some reason it randomly just starts playing normally and then stops and leaves logging this into console:
This issue happened to me multiple times as of time of writing this.
I see it says "at connResetException" but this error happens like few seconds to around a minute after it starts the song normally but usually it works fine finishes the song etc...
Is this issue with the module or discord itself disconnects bot?

Successfully reloaded application (/) commands. AudioPlayerError: aborted at connResetException (node:internal/errors:683:14) at TLSSocket.socketCloseListener (node:_http_client:407:19) at TLSSocket.emit (node:events:406:35) at node:net:662:12 at TCP.done (node:_tls_wrap:580:7) { resource: AudioResource { playbackDuration: 26160, started: true, silenceRemaining: -1, edges: [ [Object], [Object], [Object] ], playStream: Encoder { _readableState: [ReadableState], _events: [Object: null prototype], _eventsCount: 5, _maxListeners: undefined, _writableState: [WritableState], allowHalfOpen: true, encoder: null, _options: [Object], _required: 3840, _buffer: null, [Symbol(kCapture)]: false, [Symbol(kCallback)]: [Function: bound onwrite] }, metadata: null, silencePaddingFrames: 5, volume: VolumeTransformer { _readableState: [ReadableState], _events: [Object: null prototype], _eventsCount: 5, _maxListeners: undefined, _writableState: [WritableState], allowHalfOpen: true, _readInt: [Function (anonymous)], _writeInt: [Function (anonymous)], _bits: 16, _bytes: 2, _extremum: 32768, volume: 100, _chunk: null, [Symbol(kCapture)]: false, [Symbol(kCallback)]: [Function: bound onwrite] }, encoder: Encoder { _readableState: [ReadableState], _events: [Object: null prototype], _eventsCount: 5, _maxListeners: undefined, _writableState: [WritableState], allowHalfOpen: true, encoder: null, _options: [Object], _required: 3840, _buffer: null, [Symbol(kCapture)]: false, [Symbol(kCallback)]: [Function: bound onwrite] }, audioPlayer: AudioPlayer { _events: [Object: null prototype], _eventsCount: 2, _maxListeners: undefined, subscribers: [Array], _state: [Object], behaviors: [Object], debug: [Function (anonymous)], [Symbol(kCapture)]: false } } }

Video links not working as intended

The bot is completely crashing sometimes when using links or no results were found.
The weird thing when using links is,
https://youtu.be/lPzfcJY-vLU works perfectly fine, but same Video different link (https://www.youtube.com/watch?v=lPzfcJY-vLU) crashes the bot.
Error:

P:\bot stuff\darling.js\node_modules\@koenie06\discord.js-music\src\index.js:34
    if(!songInfo) throw new Error(`NO_SONG: There was no song found with the name/URL '${song}'.`);
                        ^

Error: NO_SONG: There was no song found with the name/URL 'https://www.youtube.com/watch?v=lPzfcJY-vLU'.
    at Object.exports.play (P:\bot stuff\darling.js\node_modules\@koenie06\discord.js-music\src\index.js:34:25)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

Also weird, using https://youtube.com/watch?v=__Q3AfVe7Ow returns https://youtube.com/watch?v=tc6LVATPddc as result.
Could that be a problem with https://github.com/talmobi/yt-search ?

And is there a way to prevent the bot from crashing?

Not working on M1 chips.

I am trying to install it but I get an error when doing so

npm ERR! code 126
npm ERR! path /Users/kavishgulati/Desktop/GitHub/brainbot/node_modules/@koenie06/discord.js-music/node_modules/@discordjs/opus
npm ERR! command failed
npm ERR! command sh -c node-pre-gyp install --fallback-to-build
npm ERR! sh: /Users/kavishgulati/Desktop/GitHub/brainbot/node_modules/.bin/node-pre-gyp: Permission denied

npm ERR! A complete log of this run can be found in:
npm ERR! /var/root/.npm/_logs/2021-10-31T18_04_46_303Z-debug.log

Can't play music.

Installed Node.js, Discord.js and @koenie06/discord.js-music
Gave every possible permission to the bot/application
In the code implemented token, clientId and guildId.
I can make it go online, but I can't use commands.

connection was failed to connect to vc

node:internal/process/promises:246
triggerUncaughtException(err, true /* fromPromise */);
^

[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "Connection was failed to connect to VC".] {
code: 'ERR_UNHANDLED_REJECTION'
}
PS C:

Pause and resume commands don't work

I have been trying to get the pause and resume events don't work but no matter what i always get this even though they aren't paused or resumed.
Screen Shot 2021-10-12 at 8 48 52 PM
also i would suggest to make another version with ydtl-core-discord.

the package requires dependencies but is broken and not fixable. How to fix?

PS C:\Users\Giuseppe Quattrocchi\Desktop\discord> npm install discord.js-music
npm WARN deprecated [email protected]: Critical security vulnerability fixed in v0.21.1. For more information, see axios/axios#3410
added 16 packages, and audited 345 packages in 37s

38 packages are looking for funding
run npm fund for details

15 vulnerabilities (2 low, 7 moderate, 5 high, 1 critical)

To address all issues possible (including breaking changes), run:
npm audit fix --force

Some issues need review, and may require choosing
a different dependency.

Run npm audit for details.
PS C:\Users\Giuseppe Quattrocchi\Desktop\discord> npm audit fix --force
npm WARN using --force Recommended protections disabled.
npm WARN audit Updating discord.js-music to 1.0.3,which is a SemVer major change.
npm WARN audit No fix available for yt-search@*
npm WARN audit No fix available for @koenie06/discord.js-music@*
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: node-youtube-dl is deprecated. use npm.im/youtube-dl-exec instead.
npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: request has been deprecated, see request/request#3142

added 45 packages, removed 14 packages, changed 1 package, and audited 376 packages in 17s

39 packages are looking for funding
run npm fund for details

npm audit report

ansi-regex >2.1.1 <5.0.1
Severity: moderate
Inefficient Regular Expression Complexity in chalk/ansi-regex - GHSA-93q8-gq69-wqmw
No fix available
node_modules/@koenie06/discord.js-music/node_modules/ansi-regex
node_modules/gauge/node_modules/ansi-regex
node_modules/yt-search/node_modules/ansi-regex
strip-ansi 4.0.0 - 5.2.0
Depends on vulnerable versions of ansi-regex
node_modules/@koenie06/discord.js-music/node_modules/strip-ansi
node_modules/gauge/node_modules/strip-ansi
node_modules/yt-search/node_modules/strip-ansi
string-width 2.1.0 - 4.1.0
Depends on vulnerable versions of strip-ansi
node_modules/@koenie06/discord.js-music/node_modules/string-width
node_modules/gauge/node_modules/string-width
node_modules/yt-search/node_modules/string-width
node-fzf >=0.0.5
Depends on vulnerable versions of string-width
node_modules/@koenie06/discord.js-music/node_modules/node-fzf
node_modules/yt-search/node_modules/node-fzf
yt-search *
Depends on vulnerable versions of cheerio
Depends on vulnerable versions of node-fzf
node_modules/@koenie06/discord.js-music/node_modules/yt-search
node_modules/yt-search
@koenie06/discord.js-music *
Depends on vulnerable versions of yt-search
node_modules/@koenie06/discord.js-music

lodash <=4.17.20
Severity: critical
Command Injection in lodash - GHSA-35jh-r3h4-6jhm
Prototype Pollution in lodash - GHSA-p6mc-m468-83gw
Prototype Pollution in lodash - GHSA-jf85-cpcp-j695
Prototype pollution in lodash - GHSA-x5rq-j2xg-h7qm
Prototype Pollution in lodash - GHSA-fvqr-27wr-82fm
No fix available
node_modules/lodash
cheerio 0.14.0 - 1.0.0-rc.3
Depends on vulnerable versions of css-select
Depends on vulnerable versions of lodash
node_modules/yt-search/node_modules/cheerio
yt-search *
Depends on vulnerable versions of cheerio
Depends on vulnerable versions of node-fzf
node_modules/@koenie06/discord.js-music/node_modules/yt-search
node_modules/yt-search
@koenie06/discord.js-music *
Depends on vulnerable versions of yt-search
node_modules/@koenie06/discord.js-music

nth-check <2.0.1
Severity: moderate
Inefficient Regular Expression Complexity in nth-check - GHSA-rp65-9cf3-cjxr
No fix available
node_modules/yt-search/node_modules/nth-check
css-select <=3.1.0
Depends on vulnerable versions of nth-check
node_modules/yt-search/node_modules/css-select
cheerio 0.14.0 - 1.0.0-rc.3
Depends on vulnerable versions of css-select
Depends on vulnerable versions of lodash
node_modules/yt-search/node_modules/cheerio
yt-search *
Depends on vulnerable versions of cheerio
Depends on vulnerable versions of node-fzf
node_modules/@koenie06/discord.js-music/node_modules/yt-search
node_modules/yt-search
@koenie06/discord.js-music *
Depends on vulnerable versions of yt-search
node_modules/@koenie06/discord.js-music

10 vulnerabilities (7 moderate, 2 high, 1 critical)

Some issues need review, and may require choosing
a different dependency.
PS C:\Users\Giuseppe Quattrocchi\Desktop\discord>

isPaused() ain't working.

const pause = music.isPaused({ interaction: inter }); if(pause) return inter.reply({ content: 'Song is already paused', ephemeral: true });

This is my code to check if a song is paused. But when i run the command it says song is already paused even if its not paused.

Connection was failed to connect to VC

I am keep getting this error for some reason, the bot has required perms and even joins the voice channel

I'm not sure why it cant connect to the VC, the channel is valid, the song is valid and the interaction is the message from the messageCreate

This worked with my other bots but it doesn't work with this one for some reason

Events error

I've got an error with the playlist and addlist events, if someone plays a private youtube playlist the bot gets an error, but it could be fixed with something that will check if the playlist is private or not, if it is private it will just say "The requested playlist is private and i can't play it" that will stop the error from showing up

Hi! I get this error trying to install discord.js-music

`Hi! I get this error trying to install discord.js-music

PS C:\Users\Timsl\Documents\FarCryDiscordBot> npm i @koenie06/discord.js-music
npm ERR! code ENOENT
npm ERR! syscall spawn bash
npm ERR! path C:\Users\Timsl\Documents\FarCryDiscordBot\node_modules\ffmpeg-static
npm ERR! errno -4058
npm ERR! enoent spawn bash ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Timsl\AppData\Local\npm-cache_logs\2021-09-24T09_52_20_741Z-debug.log`

playSong event fires 3-5 times

Hello, I really appreciate your work. It made everything so much easier moving to v13. There is only 1 issue I am encountering. I made my code send a message whenever the event playSong triggers. I've made sure that my code only triggers the music.play command only once, but still the event triggers at least 3 times. It seems that on the first song, everything seems to work fine, but after the first song, or after the music.stop command, the issue start occurring. Am I doing something wrong or does the event actually trigger multiple times.

One thing that I am not sure may be causing the issue is I am still using messageCreate and not interaction. But I overcome this by setting the interaction in the command as message like so:music.play({interaction: message,channel: voiceChannel,song: search}); Just FYI if this might be important.

music.event.on('playSong', (channel, songInfo, requester) => {
        message.channel.send({ content: `Now playing: ${songInfo.title}`});
    }}); 

Update @discordjs/opus in your package

In your package you are using @discordjs/opus 0.6.0 which doesn't support the latest node version (v19) and some others as well. You can see the version of @discordjs/opus on the package.json "@discordjs/opus": "^0.6.0",. No changes were really changed to @discordjs/opus if you update to the latest (0.9.0) it just added node 19 support and because this @discordjs/opus version hasn't been updated the latest it doesn't support some of the new node versions which is a problem as LTS is v18 and this package cannot even support that.

slash command

The slash command is not starting, I tried to see what it could be, and from what I saw the deploy-commands.js file is not being accessed.

the package requires dependencies but is broken and not fixable.

PS C:\Users\Giuseppe Quattrocchi\Desktop\discord> npm install discord.js-music
npm WARN deprecated [email protected]: Critical security vulnerability fixed in v0.21.1. For more information, see axios/axios#3410
added 16 packages, and audited 345 packages in 37s

38 packages are looking for funding
run npm fund for details

15 vulnerabilities (2 low, 7 moderate, 5 high, 1 critical)

To address all issues possible (including breaking changes), run:
npm audit fix --force

Some issues need review, and may require choosing
a different dependency.

Run npm audit for details.
PS C:\Users\Giuseppe Quattrocchi\Desktop\discord> npm audit fix --force
npm WARN using --force Recommended protections disabled.
npm WARN audit Updating discord.js-music to 1.0.3,which is a SemVer major change.
npm WARN audit No fix available for yt-search@*
npm WARN audit No fix available for @koenie06/discord.js-music@*
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: node-youtube-dl is deprecated. use npm.im/youtube-dl-exec instead.
npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: request has been deprecated, see request/request#3142

added 45 packages, removed 14 packages, changed 1 package, and audited 376 packages in 17s

39 packages are looking for funding
run npm fund for details

npm audit report

ansi-regex >2.1.1 <5.0.1
Severity: moderate
Inefficient Regular Expression Complexity in chalk/ansi-regex - GHSA-93q8-gq69-wqmw
No fix available
node_modules/@koenie06/discord.js-music/node_modules/ansi-regex
node_modules/gauge/node_modules/ansi-regex
node_modules/yt-search/node_modules/ansi-regex
strip-ansi 4.0.0 - 5.2.0
Depends on vulnerable versions of ansi-regex
node_modules/@koenie06/discord.js-music/node_modules/strip-ansi
node_modules/gauge/node_modules/strip-ansi
node_modules/yt-search/node_modules/strip-ansi
string-width 2.1.0 - 4.1.0
Depends on vulnerable versions of strip-ansi
node_modules/@koenie06/discord.js-music/node_modules/string-width
node_modules/gauge/node_modules/string-width
node_modules/yt-search/node_modules/string-width
node-fzf >=0.0.5
Depends on vulnerable versions of string-width
node_modules/@koenie06/discord.js-music/node_modules/node-fzf
node_modules/yt-search/node_modules/node-fzf
yt-search *
Depends on vulnerable versions of cheerio
Depends on vulnerable versions of node-fzf
node_modules/@koenie06/discord.js-music/node_modules/yt-search
node_modules/yt-search
@koenie06/discord.js-music *
Depends on vulnerable versions of yt-search
node_modules/@koenie06/discord.js-music

lodash <=4.17.20
Severity: critical
Command Injection in lodash - GHSA-35jh-r3h4-6jhm
Prototype Pollution in lodash - GHSA-p6mc-m468-83gw
Prototype Pollution in lodash - GHSA-jf85-cpcp-j695
Prototype pollution in lodash - GHSA-x5rq-j2xg-h7qm
Prototype Pollution in lodash - GHSA-fvqr-27wr-82fm
No fix available
node_modules/lodash
cheerio 0.14.0 - 1.0.0-rc.3
Depends on vulnerable versions of css-select
Depends on vulnerable versions of lodash
node_modules/yt-search/node_modules/cheerio
yt-search *
Depends on vulnerable versions of cheerio
Depends on vulnerable versions of node-fzf
node_modules/@koenie06/discord.js-music/node_modules/yt-search
node_modules/yt-search
@koenie06/discord.js-music *
Depends on vulnerable versions of yt-search
node_modules/@koenie06/discord.js-music

nth-check <2.0.1
Severity: moderate
Inefficient Regular Expression Complexity in nth-check - GHSA-rp65-9cf3-cjxr
No fix available
node_modules/yt-search/node_modules/nth-check
css-select <=3.1.0
Depends on vulnerable versions of nth-check
node_modules/yt-search/node_modules/css-select
cheerio 0.14.0 - 1.0.0-rc.3
Depends on vulnerable versions of css-select
Depends on vulnerable versions of lodash
node_modules/yt-search/node_modules/cheerio
yt-search *
Depends on vulnerable versions of cheerio
Depends on vulnerable versions of node-fzf
node_modules/@koenie06/discord.js-music/node_modules/yt-search
node_modules/yt-search
@koenie06/discord.js-music *
Depends on vulnerable versions of yt-search
node_modules/@koenie06/discord.js-music

10 vulnerabilities (7 moderate, 2 high, 1 critical)

Some issues need review, and may require choosing
a different dependency.
PS C:\Users\Giuseppe Quattrocchi\Desktop\discord>

Does not install

When installing I get many errors

npm ERR! command failed
npm ERR! command sh -c node-pre-gyp install --fallback-to-build
npm ERR! Failed to execute '/nix/store/ra8r42571xvv1m85wanh1ll9mxmp0mwl-nodejs-16.13.2/bin/node /nix/store/ra8r42571xvv1m85wanh1ll9mxmp0mwl-nodejs-16.13.2/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/home/runner/masterchief-bot/node_modules/@discordjs/opus/prebuild/node-v93-napi-v3-linux-x64-glibc-2.33/opus.node --module_name=opus --module_path=/home/runner/masterchief-bot/node_modules/@discordjs/opus/prebuild/node-v93-napi-v3-linux-x64-glibc-2.33 --napi_version=8 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using [email protected]
npm ERR! node-pre-gyp info using [email protected] | linux | x64
npm ERR! node-pre-gyp info check checked for "/home/runner/masterchief-bot/node_modules/@discordjs/opus/prebuild/node-v93-napi-v3-linux-x64-glibc-2.33/opus.node" (not found)
npm ERR! node-pre-gyp http GET https://github.com/discordjs/opus/releases/download/v0.6.0/opus-v0.6.0-node-v93-napi-v3-linux-x64-glibc-2.33.tar.gz
npm ERR! node-pre-gyp ERR! install response status 404 Not Found on https://github.com/discordjs/opus/releases/download/v0.6.0/opus-v0.6.0-node-v93-napi-v3-linux-x64-glibc-2.33.tar.gz 
npm ERR! node-pre-gyp WARN Pre-built binaries not installable for @discordjs/[email protected] and [email protected] (node-v93 ABI, glibc) (falling back to source compile with node-gyp) 
npm ERR! node-pre-gyp WARN Hit error response status 404 Not Found on https://github.com/discordjs/opus/releases/download/v0.6.0```

Feature Request: Server Queue command

Feature Request:

Add a way to send the song queue as a message so people in the server can see the VC, instead of it only being able to post to the console.
As an example, you could use music.queue({}) and have the standard interaction: interaction in there, but also urls: boolean to have a song show as either Author - Name or Author - Name (URL), requester: boolean to add Requested by User to the end.

Music plays, but stops after roughly 30 seconds. Fails silently.

The bot I have written fails to play a song to completion, and does not spit out any error logs. Not sure if they are happening, or if they are simply not logging.

I am willing to bet that this is related to this => Stack overflow issue

Where packet loss causes an abrupt end. In any case, if you have any idea of what I could do please let me know. I will link my repo below for any context you may need.

https://github.com/OnionQueenMemu/sir-shallot-allium

audio player frequently aborts

audio player aborts at random times, during songs
oh and any volume above 1 sounds distorted and is way too loud.
error message:

AudioPlayerError: aborted
    at connResetException (node:internal/errors:691:14)        
    at TLSSocket.socketCloseListener (node:_http_client:407:19)
    at TLSSocket.emit (node:events:406:35)
    at node:net:672:12
    at TCP.done (node:_tls_wrap:580:7) {
  resource: AudioResource {
    playbackDuration: 194220,
    started: true,
    silenceRemaining: -1,
    edges: [ [Object], [Object], [Object] ],
    playStream: Encoder {
      _readableState: [ReadableState],
      _events: [Object: null prototype],
      _eventsCount: 5,
      _maxListeners: undefined,
      _writableState: [WritableState],
      allowHalfOpen: true,
      encoder: null,
      _options: [Object],
      _required: 3840,
      _buffer: null,
      [Symbol(kCapture)]: false,
      [Symbol(kCallback)]: [Function: bound onwrite]
    },
    metadata: null,
    silencePaddingFrames: 5,
    volume: VolumeTransformer {
      _readableState: [ReadableState],
      _events: [Object: null prototype],
      _eventsCount: 5,
      _maxListeners: undefined,
      _writableState: [WritableState],
      allowHalfOpen: true,
      _readInt: [Function (anonymous)],
      _writeInt: [Function (anonymous)],
      _bits: 16,
      _bytes: 2,
      _extremum: 32768,
      volume: 1,
      _chunk: null,
      [Symbol(kCapture)]: false,
      [Symbol(kCallback)]: [Function: bound onwrite]
    },
    encoder: Encoder {
      _readableState: [ReadableState],
      _events: [Object: null prototype],
      _eventsCount: 5,
      _maxListeners: undefined,
      _writableState: [WritableState],
      allowHalfOpen: true,
      encoder: null,
      _options: [Object],
      _required: 3840,
      _buffer: null,
      [Symbol(kCapture)]: false,
      [Symbol(kCallback)]: [Function: bound onwrite]
    },
    audioPlayer: AudioPlayer {
      _events: [Object: null prototype],
      _eventsCount: 2,
      _maxListeners: undefined,
      subscribers: [Array],
      _state: [Object],
      behaviors: [Object],
      debug: [Function (anonymous)],
      [Symbol(kCapture)]: false
    }
  }
}

random songs play, after linking songs from a playlist

random different songs play when using youtube links from a playlist.
song being played:


{
  title: 'Color Song for Kids: Learn 9 Colors',
  description: 'In this fun color song with balloons we learn 9 colors. Sing-a-long and wave bye-bye to the balloons! Download over 75 Free Kids ...',
  duration: '2:05',
  views: 9580356,
  author: 'Dream English Kids',
  url: 'https://youtube.com/watch?v=z0HZNaM7gTg',
  thumbnail: 'https://i.ytimg.com/vi/z0HZNaM7gTg/hq720.jpg',
  likes: 12826,
  dislikes: 3722,
  extra: { type: 'video', playlist: null }
}

song requested https://www.youtube.com/watch?v=b09YiH6UW2I&list=LL&index=9
(ghost in the shell cardigans paralyzed)

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.