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 toolkit2y 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
duck2y ago
we do not support tos violations
Aviv
AvivOP2y ago
pardon me for asking but what is the TOS violation regarding this development?
duck
duck2y ago
streaming from youtube
Aviv
AvivOP2y 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
duck2y ago
not streaming from youtube? not sure what you're asking
Aviv
AvivOP2y ago
so basically all music bots atm that work with youtube are breaking tos?
duck
duck2y ago
yes
Aviv
AvivOP2y ago
Ah, I see. so in a general question, can a bot play a non-AudioResource file? such as plain mp3?
duck
duck2y 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 docs2y ago
guide Getting Started: Installation - Extra Dependencies read more
Aviv
AvivOP2y ago
got it, thanks!
Want results from more Discord servers?
Add your server