TypeError [ERR_INVALID_ARG_TYPE]: The "body" argument must be of type function or an instance of Blo

TypeError [ERR_INVALID_ARG_TYPE]: The "body" argument must be of type function or an instance of Blob, ReadableStream, WritableStream, Stream, Iterable, AsyncIterable, or Promise or { readable, writable } pair. Received undefined
11 Replies
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
ShompiFlen
ShompiFlen2y ago
and the code that is throwing this error? what was the last thing you added or tested before this thing throwed
RichtigJoJo
RichtigJoJoOP2y ago
last month it works but now not I have a normal play command
let url = interaction.options.getString("url")

let connection = DiscordVoice.joinVoiceChannel({
channelId: interaction.member.voice.channelId,
guildId: interaction.guild.id,
adapterCreator: interaction.guild.voiceAdapterCreator,
})

let resource = DiscordVoice.createAudioResource(url, {
inlineVolume: true
})

let player = DiscordVoice.createAudioPlayer()
connection.subscribe(player)
player.play(resource)
let url = interaction.options.getString("url")

let connection = DiscordVoice.joinVoiceChannel({
channelId: interaction.member.voice.channelId,
guildId: interaction.guild.id,
adapterCreator: interaction.guild.voiceAdapterCreator,
})

let resource = DiscordVoice.createAudioResource(url, {
inlineVolume: true
})

let player = DiscordVoice.createAudioPlayer()
connection.subscribe(player)
player.play(resource)
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
RichtigJoJo
RichtigJoJoOP2y ago
What did I need to do?
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
RichtigJoJo
RichtigJoJoOP2y ago
I'm not using fetch
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
RichtigJoJo
RichtigJoJoOP2y ago
I updated everything but it don't works
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
RichtigJoJo
RichtigJoJoOP2y ago
node:events:515
throw er; // Unhandled 'error' event
^

TypeError [ERR_INVALID_ARG_TYPE]: The "body" argument must be of type function or an instance of Blob, ReadableStream, WritableStream, Stream, Iterable, AsyncIterable, or Promise or { readable, writable } pair. Received undefined
at new NodeError (node:internal/errors:388:5)
at duplexify (node:internal/streams/duplexify:199:9)
at Duplex.from (node:internal/streams/duplex:146:10)
at pipelineImpl (node:internal/streams/pipeline:258:22)
at pipeline (node:internal/streams/pipeline:150:10)
at new AudioResource (D:\Users\ME\Bot\node_modules\@discordjs\voice\dist\index.js:1781:77)
at Object.createAudioResource (D:\Users\ME\Bot\node_modules\@discordjs\voice\dist\index.js:1858:10)
at Client.<anonymous> (D:\Users\ME\Bot\events\voiceStateUpdate.js:26:37)
at Client.emit (node:events:537:28)
at VoiceStateUpdate.handle (D:\Users\ME\Bot\node_modules\discord.js\src\client\actions\VoiceStateUpdate.js:38:14)
Emitted 'error' event on Client instance at:
at emitUnhandledRejectionOrErr (node:events:393:10)
at process.processTicksAndRejections (node:internal/process/task_queues:84:21) {
code: 'ERR_INVALID_ARG_TYPE'
}
node:events:515
throw er; // Unhandled 'error' event
^

TypeError [ERR_INVALID_ARG_TYPE]: The "body" argument must be of type function or an instance of Blob, ReadableStream, WritableStream, Stream, Iterable, AsyncIterable, or Promise or { readable, writable } pair. Received undefined
at new NodeError (node:internal/errors:388:5)
at duplexify (node:internal/streams/duplexify:199:9)
at Duplex.from (node:internal/streams/duplex:146:10)
at pipelineImpl (node:internal/streams/pipeline:258:22)
at pipeline (node:internal/streams/pipeline:150:10)
at new AudioResource (D:\Users\ME\Bot\node_modules\@discordjs\voice\dist\index.js:1781:77)
at Object.createAudioResource (D:\Users\ME\Bot\node_modules\@discordjs\voice\dist\index.js:1858:10)
at Client.<anonymous> (D:\Users\ME\Bot\events\voiceStateUpdate.js:26:37)
at Client.emit (node:events:537:28)
at VoiceStateUpdate.handle (D:\Users\ME\Bot\node_modules\discord.js\src\client\actions\VoiceStateUpdate.js:38:14)
Emitted 'error' event on Client instance at:
at emitUnhandledRejectionOrErr (node:events:393:10)
at process.processTicksAndRejections (node:internal/process/task_queues:84:21) {
code: 'ERR_INVALID_ARG_TYPE'
}
Want results from more Discord servers?
Add your server