aiko-chan-ai / Discord-video-selfbot

for djs-selfbot-v13
https://github.com/dank074/Discord-video-stream
33 stars 8 forks source link

Error: No voice channel provided #1

Closed Turkidev closed 1 year ago

Turkidev commented 1 year ago

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(); `

aiko-chan-ai commented 1 year ago

pls markdown code

aiko-chan-ai commented 1 year ago

check client.channels.cache.get('voiceChannelId')

Turkidev commented 1 year ago

what about it?

Turkidev commented 1 year ago

image

aiko-chan-ai commented 1 year ago

image

you didn't put the vc in

Turkidev commented 1 year ago

no i did image

Turkidev commented 1 year ago

this is it image

aiko-chan-ai commented 1 year ago

console.log(client.channels.cache.get('voiceChannelId'))

Turkidev commented 1 year ago

console.log(client.channels.cache.get('voiceChannelId'))

image

aiko-chan-ai commented 1 year ago

...

Turkidev commented 1 year ago

sad

lambor590 commented 1 year ago

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.

aiko-chan-ai commented 1 year ago

https://github.com/aiko-chan-ai/discord.js-selfbot-v13/issues/625

aiko-chan-ai commented 1 year ago

v2.13.4