Trying to make an automatic join to VC but wont work

Code
client.on("ready",(c)=>{
const channel = c.channels.cache.get('1136337935201996850')
const connection = joinVoiceChannel({
channelId: channel.id,
guildId: channel.guild.id,
adapterCreator: channel.guild.voiceAdapterCreater
})

//connection();
c.user.setActivity({
name: 'Events & Giveaways!',
type: ActivityType.Playing,
})
});
client.on("ready",(c)=>{
const channel = c.channels.cache.get('1136337935201996850')
const connection = joinVoiceChannel({
channelId: channel.id,
guildId: channel.guild.id,
adapterCreator: channel.guild.voiceAdapterCreater
})

//connection();
c.user.setActivity({
name: 'Events & Giveaways!',
type: ActivityType.Playing,
})
});
error
const adapter = options.adapterCreator({
^

TypeError: options.adapterCreator is not a function
const adapter = options.adapterCreator({
^

TypeError: options.adapterCreator is not a function
3 Replies
d.js toolkit
d.js toolkit16mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button!
duck
duck16mo ago
voiceAdapterCreator
Asega
AsegaOP16mo ago
const adapter = options.adapterCreator({ ^ TypeError: options.adapterCreator is not a function at new VoiceConnection (C:\Users\Rafferty\Documents\PioneerBotCode\node_modules@discordjs\voice\dist\index.js:1683:29) at createVoiceConnection (C:\Users\Rafferty\Documents\PioneerBotCode\node_modules@discordjs\voice\dist\index.js:2103:27) at joinVoiceChannel (C:\Users\Rafferty\Documents\PioneerBotCode\node_modules@discordjs\voice\dist\index.js:2124:10) at Client.<anonymous> (C:\Users\Rafferty\Documents\PioneerBotCode\src\index.js:18:24) at Client.emit (node:events:525:35) at WebSocketManager.triggerClientReady (C:\Users\Rafferty\Documents\PioneerBotCode\node_modules\discord.js\src\client\websocket\WebSocketManager.js:387:17) 10) at WebSocketShard.<anonymous> (C:\Users\Rafferty\Documents\PioneerBotCode\node_modules\discord.js\src\client\websocket\WebSocketManager.js:200:16) at WebSocketShard.emit (node:events:513:28) at WebSocketShard.checkReady (C:\Users\Rafferty\Documents\PioneerBotCode\node_modules\discord.js\src\client\websocket\WebSocketShard.js:181:12) lol no chance bro thank you
Want results from more Discord servers?
Add your server