You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hello i have an issue were the bot joins the chat, starts streaming but the stream just loads, nothing shows, i know its picking up the right file bcs the duration of the stream corresponds to the duration of the video. Tried with different videos and formats but nothing seem to work, can someone help pls. here is the code adapted to my bot, i have differnet files for each command
// Debugging: Log the attempt to stream
console.log(`Attempting to stream video in guild: ${guildId}, channel: ${voiceChannelId}`);
try {
const streamer = new Streamer(client);
// Debugging: Log successful creation of the Streamer instance
console.log('Streamer instance created successfully.');
await streamer.joinVoice(guildId, voiceChannelId);
// Debugging: Log successful voice channel join
console.log(`Joined voice channel ${voiceChannelId} successfully.`);
const streamUdpConn = await streamer.createStream();
// Debugging: Log successful stream creation
console.log('Stream created successfully.');
const videoPath = "commands/ent/video/test3.mp4"; // Ensure this path is correct
// Debugging: Log the video path
console.log(`Streaming video from path: ${videoPath}`);
const res = await streamLivestreamVideo(videoPath, streamUdpConn, true);
console.log('Finished streaming video:', res);
// Optionally, handle stopping the stream and leaving the voice channel
streamer.leaveVoice();
} catch (error) {
// Enhanced error logging
console.error('Error encountered during video streaming:', error.message, error.stack);
message.reply('There was an error streaming the video. Check the server logs for more details.');
}
},
};
`
The text was updated successfully, but these errors were encountered:
hello i have an issue were the bot joins the chat, starts streaming but the stream just loads, nothing shows, i know its picking up the right file bcs the duration of the stream corresponds to the duration of the video. Tried with different videos and formats but nothing seem to work, can someone help pls. here is the code adapted to my bot, i have differnet files for each command
`const { Client } = require('discord.js-selfbot-v13');
const { Streamer, streamLivestreamVideo } = require('@dank074/discord-video-stream');
const config = require('./config.json');
module.exports = {
name: 'streamvideo',
category: 'voice',
permissions: ['CONNECT', 'SPEAK'],
devOnly: false,
run: async ({ client, message, args }) => {
const voiceChannelId = "962032795176304710";
const guildId = message.guild.id;
};
`
The text was updated successfully, but these errors were encountered: