Closed Turkidev closed 1 year ago
pls markdown code
check client.channels.cache.get('voiceChannelId')
what about it?
you didn't put the vc in
no i did
this is it
console.log(client.channels.cache.get('voiceChannelId'))
console.log(client.channels.cache.get('voiceChannelId'))
...
I have also this problem.
Even if I use message.member.voice.channel
in the messageCreate
event it has a value of null.
The thing is, I also have this problem using the main library discord.js-selfbot-v13. I can get the text channels, but not the voice channels.
v2.13.4
i got this error Error: No voice channel provided
` import { Client } from 'discord.js-selfbot-v13'; import { DiscordStreamClient } from 'discord-stream-client';
const client = new Client(); const StreamClient = new DiscordStreamClient(client);
const token = 'token';
await client.login(token);
client.on('ready', () => { console.log(
Logged in as ${client.user.tag}!
); });// Connect to a voice channel const voiceConnection = await StreamClient.joinVoiceChannel( client.channels.cache.get('voiceChannelId'), { selfDeaf: false, selfMute: true, selfVideo: false, }, ); // Create a stream const streamConnection = await voiceConnection.createStream(); // Create a player const player = StreamClient.createPlayer( 'https://dl2.issou.best/ordr/videos/render1046454.mp4', // DIRECT VIDEO URL OR READABLE STREAM HERE streamConnection.udp, // UDP connection ); // Events player.on('finish', () => { console.log('Finished playing'); }); // Play video !!! player.play(); // Stop playing player.stop(); `