voice problem

no error but it didn't play the song !
else if (args[0] === prefix + "play" || args[0] === prefix + "p" || args[0] === prefix + "Ψ΄ΨΊΩ„") {
if (!message.member.voice.channelId) return message.reply({ content: `:no_entry_sign: You must join a voice channel to use that!` }).then(msg => { bot_messages.set(message.id, msg); setTimeout(() => bot_messages.delete(message.id), 1800000) });
let client_m = message.guild.members.me;
if (client_m.voice.channelId && message.member.voice.channelId !== client_m.voice.channelId) return message.reply({ content: `:no_entry_sign: You must be listening in **${client_m.voice.channel.name}** to use that!` }).then(msg => { bot_messages.set(message.id, msg); setTimeout(() => bot_messages.delete(message.id), 1800000) });
let song = args.slice(1).join(" ");
if (!song) return message.reply({ content: `❌ Please provide song url or name to play.` }).then(msg => { bot_messages.set(message.id, msg); setTimeout(() => bot_messages.delete(message.id), 1800000) });
if (song.split(" ")[0].includes("soundcloud.com") && song.split(" ")[0].includes("http")) {
song = await getWebSoundCloudURL(song.split(" ")[0]);
}
await music_client.distube.play(message.member.voice.channel, song, {
member: message.member,
message,
textChannel: message.channel
}).catch(() => {
message.reply({ content: `**πŸ” Not found.**` }).then(msg => { bot_messages.set(message.id, msg); setTimeout(() => bot_messages.delete(message.id), 1800000) });
});
let queue = music_client.distube.getQueue(message);
if (queue) {
let data = await music_db.get(music_client.user.id);
if (!data) {
data = defaultData;
}
try {
queue.setVolume(data.volume);
queue.setRepeatMode(data.repeat ? 1 : 0);
} catch {}
}
}
else if (args[0] === prefix + "play" || args[0] === prefix + "p" || args[0] === prefix + "Ψ΄ΨΊΩ„") {
if (!message.member.voice.channelId) return message.reply({ content: `:no_entry_sign: You must join a voice channel to use that!` }).then(msg => { bot_messages.set(message.id, msg); setTimeout(() => bot_messages.delete(message.id), 1800000) });
let client_m = message.guild.members.me;
if (client_m.voice.channelId && message.member.voice.channelId !== client_m.voice.channelId) return message.reply({ content: `:no_entry_sign: You must be listening in **${client_m.voice.channel.name}** to use that!` }).then(msg => { bot_messages.set(message.id, msg); setTimeout(() => bot_messages.delete(message.id), 1800000) });
let song = args.slice(1).join(" ");
if (!song) return message.reply({ content: `❌ Please provide song url or name to play.` }).then(msg => { bot_messages.set(message.id, msg); setTimeout(() => bot_messages.delete(message.id), 1800000) });
if (song.split(" ")[0].includes("soundcloud.com") && song.split(" ")[0].includes("http")) {
song = await getWebSoundCloudURL(song.split(" ")[0]);
}
await music_client.distube.play(message.member.voice.channel, song, {
member: message.member,
message,
textChannel: message.channel
}).catch(() => {
message.reply({ content: `**πŸ” Not found.**` }).then(msg => { bot_messages.set(message.id, msg); setTimeout(() => bot_messages.delete(message.id), 1800000) });
});
let queue = music_client.distube.getQueue(message);
if (queue) {
let data = await music_db.get(music_client.user.id);
if (!data) {
data = defaultData;
}
try {
queue.setVolume(data.volume);
queue.setRepeatMode(data.repeat ? 1 : 0);
} catch {}
}
}
2 Replies
d.js toolkit
d.js toolkitβ€’9mo 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!
chewie 🌈
chewie πŸŒˆβ€’9mo ago
we dont provide support for distube, for several reasons