bot cannot connect

const connection = joinVoiceChannel({
channelId: channel.id,
guildId: channel.guild.id,
adapterCreator: channel.guild.voiceAdapterCreator,
selfDeaf: false,
});

try {
await entersState(connection, VoiceConnectionStatus.Ready, 15_000);
} catch (error) {
console.error('❌ Connection failed:', error);
return message.reply('❌ Failed to connect to voice channel.');
}
const connection = joinVoiceChannel({
channelId: channel.id,
guildId: channel.guild.id,
adapterCreator: channel.guild.voiceAdapterCreator,
selfDeaf: false,
});

try {
await entersState(connection, VoiceConnectionStatus.Ready, 15_000);
} catch (error) {
console.error('❌ Connection failed:', error);
return message.reply('❌ Failed to connect to voice channel.');
}
the bot join the channel but keep getting error node v 22.11 discord v 14.21
:x: Connection failed: AbortError: The operation was aborted
at AbortSignal.abortListener (node:events:1005:14)
at [nodejs.internal.kHybridDispatch] (node:internal/event_target:816:20)
at AbortSignal.dispatchEvent (node:internal/event_target:751:26)
at runAbort (node:internal/abort_controller:410:10)
at abortSignal (node:internal/abort_controller:396:3)
at AbortController.abort (node:internal/abort_controller:428:5)
at Timeout.<anonymous> (C:\Users\Administrator\Desktop\PROJECT VOICE ML\node_modules\@discordjs\voice\dist\index.js:2536:39)
at listOnTimeout (node:internal/timers:594:17)
at process.processTimers (node:internal/timers:529:7) {
code: 'ABORT_ERR',
[cause]: DOMException [AbortError]: This operation was aborted
at new DOMException (node:internal/per_context/domexception:53:5)
at AbortController.abort (node:internal/abort_controller:427:18)
at Timeout.<anonymous> (C:\Users\Administrator\Desktop\PROJECT VOICE ML\node_modules\@discordjs\voice\dist\index.js:2536:39)
at listOnTimeout (node:internal/timers:594:17)
at process.processTimers (node:internal/timers:529:7)
}
:x: Connection failed: AbortError: The operation was aborted
at AbortSignal.abortListener (node:events:1005:14)
at [nodejs.internal.kHybridDispatch] (node:internal/event_target:816:20)
at AbortSignal.dispatchEvent (node:internal/event_target:751:26)
at runAbort (node:internal/abort_controller:410:10)
at abortSignal (node:internal/abort_controller:396:3)
at AbortController.abort (node:internal/abort_controller:428:5)
at Timeout.<anonymous> (C:\Users\Administrator\Desktop\PROJECT VOICE ML\node_modules\@discordjs\voice\dist\index.js:2536:39)
at listOnTimeout (node:internal/timers:594:17)
at process.processTimers (node:internal/timers:529:7) {
code: 'ABORT_ERR',
[cause]: DOMException [AbortError]: This operation was aborted
at new DOMException (node:internal/per_context/domexception:53:5)
at AbortController.abort (node:internal/abort_controller:427:18)
at Timeout.<anonymous> (C:\Users\Administrator\Desktop\PROJECT VOICE ML\node_modules\@discordjs\voice\dist\index.js:2536:39)
at listOnTimeout (node:internal/timers:594:17)
at process.processTimers (node:internal/timers:529:7)
}
5 Replies
d.js toolkit
d.js toolkit3mo ago
Inky
Inky3mo ago
Did you enable the guild voice states intent in the Client?
</๖ۣۜtomato
</๖ۣۜtomato3mo ago
try adding manualy the channel and the guild id
Blue
BlueOP3mo ago
yes i do i tried and same issue
</๖ۣۜtomato
</๖ۣۜtomato3mo ago
try making the self deaf true

Did you find this page helpful?