My discord bot errors and crashes when I attempt to play a song named suicidal ft juice wrld (I think) it's the prompt the pops up is there anyway to fix this?
if (cmd === "play") {
try {
if (!message.member.roles.cache.has('958887519146102816') && !message.member.permissions.has("ADMINISTRATOR"))
return message.channel.send({ embeds: [noPermissionEmbed] });
let voiceChannel = message.member.voice.channel;
if (!voiceChannel) return message.reply(`You Need to Join Voice Channel`);
let search_Song = args.join(" ");
if (!search_Song) return message.reply(`Type Song name or Link`);
let queue = player.createQueue(message.guild.id, {
metadata: {
channel: message.channel,
},
});
// verify vc connection
try {
if (!queue.connection) await queue.connect(voiceChannel);
} catch {
queue.destroy();
return await message.reply({
content: "Could not join your voice channel!",
ephemeral: true,
});
}
let song = await player
.search(search_Song, {
requestedBy: message.author,
})
.then((x) => x.tracks[0]);
if (!song) return message.reply(` I cant Find \`${search_Song}\` `);
queue.play(song);
message.channel.send({ content: `⏱️ | Loading track **${song.title}**!` });
} catch(err) {
message.reply(`awww there was an ${err}`)
}
}
There error is too long to post it's over 3500 characters long.