John Snos
John Snos
DIAdiscord.js - Imagine an app
Created by John Snos on 11/1/2024 in #djs-voice
Play audio problem
I really don't understand how the problem was solved (:
84 replies
DIAdiscord.js - Imagine an app
Created by John Snos on 11/1/2024 in #djs-voice
Play audio problem
It is difficult to explain.
84 replies
DIAdiscord.js - Imagine an app
Created by John Snos on 11/1/2024 in #djs-voice
Play audio problem
And trivial
84 replies
DIAdiscord.js - Imagine an app
Created by John Snos on 11/1/2024 in #djs-voice
Play audio problem
And illogical
84 replies
DIAdiscord.js - Imagine an app
Created by John Snos on 11/1/2024 in #djs-voice
Play audio problem
The reason is kind of stupid.
84 replies
DIAdiscord.js - Imagine an app
Created by John Snos on 11/1/2024 in #djs-voice
Play audio problem
Because I forgot to define connection.destroy(); to end the music.
84 replies
DIAdiscord.js - Imagine an app
Created by John Snos on 11/1/2024 in #djs-voice
Play audio problem
Thanks for the help.
84 replies
DIAdiscord.js - Imagine an app
Created by John Snos on 11/1/2024 in #djs-voice
Play audio problem
The problem was from connection.destroy();
84 replies
DIAdiscord.js - Imagine an app
Created by John Snos on 11/1/2024 in #djs-voice
Play audio problem
🥳🥳🥳🥳🥳
84 replies
DIAdiscord.js - Imagine an app
Created by John Snos on 11/1/2024 in #djs-voice
Play audio problem
I solved the problem
84 replies
DIAdiscord.js - Imagine an app
Created by John Snos on 11/1/2024 in #djs-voice
Play audio problem
I think the problem because connection.destroy();
84 replies
DIAdiscord.js - Imagine an app
Created by John Snos on 11/1/2024 in #djs-voice
Play audio problem
I have concluded something.
84 replies
DIAdiscord.js - Imagine an app
Created by John Snos on 11/1/2024 in #djs-voice
Play audio problem
No, I came in and heard the sound on.
84 replies
DIAdiscord.js - Imagine an app
Created by John Snos on 11/1/2024 in #djs-voice
Play audio problem
The bot is in a voice room and when I typed the command play He also started talking on another server.
84 replies
DIAdiscord.js - Imagine an app
Created by John Snos on 11/1/2024 in #djs-voice
Play audio problem
client.on('messageCreate', async (message) => {
console.log('w2')
if(message.content == "play1"){
console.log('w')
const voiceChannel = message.member.voice.channel;
if (!voiceChannel) {
return message.reply('You need to be in a voice channel to play the song!');
}

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

const player = createAudioPlayer();
const filePath = path.join(__dirname, 'voice_1.mp3');
const resource = createAudioResource(filePath);

player.play(resource);
connection.subscribe(player);

player.on(AudioPlayerStatus.Playing, () => {
console.log('Song is now playing');
message.reply('Song started playing!');
});

player.on(AudioPlayerStatus.Idle, () => {
console.log('Song has finished playing');
//connection.destroy();

});
}
});
client.on('messageCreate', async (message) => {
console.log('w2')
if(message.content == "play1"){
console.log('w')
const voiceChannel = message.member.voice.channel;
if (!voiceChannel) {
return message.reply('You need to be in a voice channel to play the song!');
}

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

const player = createAudioPlayer();
const filePath = path.join(__dirname, 'voice_1.mp3');
const resource = createAudioResource(filePath);

player.play(resource);
connection.subscribe(player);

player.on(AudioPlayerStatus.Playing, () => {
console.log('Song is now playing');
message.reply('Song started playing!');
});

player.on(AudioPlayerStatus.Idle, () => {
console.log('Song has finished playing');
//connection.destroy();

});
}
});
84 replies
DIAdiscord.js - Imagine an app
Created by John Snos on 11/1/2024 in #djs-voice
Play audio problem
Do you see this picture?
84 replies
DIAdiscord.js - Imagine an app
Created by John Snos on 11/1/2024 in #djs-voice
Play audio problem
No description
84 replies
DIAdiscord.js - Imagine an app
Created by John Snos on 11/1/2024 in #djs-voice
Play audio problem
Same problem
84 replies
DIAdiscord.js - Imagine an app
Created by John Snos on 11/1/2024 in #djs-voice
Play audio problem
I will try it again
84 replies
DIAdiscord.js - Imagine an app
Created by John Snos on 11/1/2024 in #djs-voice
Play audio problem
okay I will do
84 replies