#im getting the classic AudioPlayerError: aborted.

15 messages · Page 1 of 1 (latest)

exotic yew
#

Error:

AudioPlayerError: aborted
    at connResetException (node:internal/errors:691:14)
    at TLSSocket.socketCloseListener (node:_http_client:402:19)
    at TLSSocket.emit (node:events:538:35)
    at node:net:687:12
    at TCP.done (node:_tls_wrap:580:7) {
  resource: AudioResource {
    playStream: OggDemuxer {
      _readableState: [ReadableState],
      _events: [Object: null prototype],
      _eventsCount: 5,
      _maxListeners: undefined,
      _writableState: [WritableState],
      allowHalfOpen: true,
      _remainder: null,
      _head: null,
      _bitstream: null,
      [Symbol(kCapture)]: false,
      [Symbol(kCallback)]: [Function: bound onwrite]
    },
    edges: [ [Object], [Object] ],
    metadata: null,
    volume: undefined,
    encoder: undefined,
    audioPlayer: AudioPlayer {
      _events: [Object: null prototype],
      _eventsCount: 1,
      _maxListeners: undefined,
      _state: [Object],
      subscribers: [Array],
      behaviors: [Object],
      debug: [Function (anonymous)],
      [Symbol(kCapture)]: false
    },
    playbackDuration: 15720,
    started: true,
    silencePaddingFrames: 5,
    silenceRemaining: -1
  }
}

the code is just creating a resource out of stream from ytdl and player playing that resource.

willow cometBOT
#

• What's your exact discord.js npm list discord.js and node node -v version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.

blazing rain
#

we do not support tos violations

exotic yew
blazing rain
#

streaming from youtube

exotic yew
#

i see. so what is the move favorable way of doing so?

#

as obviously im new to discordjs/voice and want to stand in regulations.

blazing rain
#

not streaming from youtube?
not sure what you're asking

exotic yew
#

so basically all music bots atm that work with youtube are breaking tos?

blazing rain
#

yes

exotic yew
#

Ah, I see. so in a general question, can a bot play a non-AudioResource file? such as plain mp3?

blazing rain
#

AudioResource is just a djs/voice structure
it can be created from an mp3 file

#

createAudioResource accepts a filepath

#

for mp3 in particular, you'll need the extra dependencies mentioned on the guide

prisma walrusBOT
#

guide Getting Started: Installation - Extra Dependencies
read more