Koenie06 / Discord.js-Music

19 stars 13 forks source link

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

Closed TukanDev closed 2 years ago

TukanDev commented 2 years ago

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(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
}

} } `

KauaAmaroPires commented 2 years ago

Explain to me how you managed to make it work, because I installed all the npm and it logs in good, but it doesn't show the slash commands

TukanDev commented 2 years ago

Explain to me how you managed to make it work, because I installed all the npm and it logs in good, but it doesn't show the slash commands

I use my custom handlers and i just wrote commands myself ;)

KauaAmaroPires commented 2 years ago

Explique como você conseguiu fazer funcionar, porque eu instalei todo o npm e ele se loga bem, mas não mostra os comandos slash

Eu uso meus gerenciadores personalizados e acabei de escrever comandos;)

got it, I thought you used this script like me.

TukanDev commented 2 years ago

Explique como você conseguiu fazer funcionar, porque eu instalei todo o npm e ele se loga bem, mas não mostra os comandos slash

Eu uso meus gerenciadores personalizados e acabei de escrever comandos;)

got it, I thought you used this script like me.

Also if you get AudioPlayerError: aborted at connResetException i searched around a bit and its isssue with ytdl-core module used for making this module so you need to switch to youtube-dl and literally modify module's code.