im getting the classic AudioPlayerError: aborted.

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
}
}
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.
12 Replies
d.js toolkit
d.js toolkit13mo ago
• 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.
duck
duck13mo ago
we do not support tos violations
Aviv
Aviv13mo ago
pardon me for asking but what is the TOS violation regarding this development?
duck
duck13mo ago
streaming from youtube
Aviv
Aviv13mo ago
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.
duck
duck13mo ago
not streaming from youtube? not sure what you're asking
Aviv
Aviv13mo ago
so basically all music bots atm that work with youtube are breaking tos?
duck
duck13mo ago
yes
Aviv
Aviv13mo ago
Ah, I see. so in a general question, can a bot play a non-AudioResource file? such as plain mp3?
duck
duck13mo ago
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
d.js docs
d.js docs13mo ago
guide Getting Started: Installation - Extra Dependencies read more
Aviv
Aviv13mo ago
got it, thanks!