nekodendislikeN
Deno12mo ago
4 replies
nekodendislike

Bad resource ID ERROR

error: Uncaught (in promise) BadResource: Bad resource ID

at node:http:306:27

at HttpsClientRequest._writeHeader (node:http:398:7)

at HttpsClientRequest._flushHeaders (node:_http_outgoing:
382:12)

at TLSSocket.onConnect (node:http:444:16)

at TLSSocket.emit (ext:deno_node/_events.mjs:405:35)

at _afterConnect (node:net:159:12)

at _afterConnectMultiple (node:net:214:3)

at TCP.afterConnect (ext:deno_node/internal_binding/conne
ction_wrap.ts:43:11)

at TCP.handle.afterConnect (node:_tls_wrap:157:29)

at eventLoopTick (ext:core/01_core.js:175:7)

So I’m developing discord bot with deno and discord.js.
When I tried that play music VC, This error is throwing.

This is part of the Source code
const res = createAudioResource('../../resource/rakustereo/It_isnt_raining.mp3');
        player.play(res);
        player.on(AudioPlayerStatus.Playing, () => {
            console.log('The audio is now playing!');
        });
        player.on(AudioPlayerStatus.Idle, () => {
            console.log('Playback has ended.');
            connection.destroy();
        });
Was this page helpful?