fix: add logging for youtube confirmation errors

This commit is contained in:
Marius Begby committed 2023-07-23 12:02:25 +02:00
1 parent cef6b7f141
commit 50f4157648
1 file changed
+6
+6
View File
@@ -98,6 +98,9 @@ module.exports = {
logger.debug(`[Shard ${interaction.guild.shardId}] player.play() successful. Query: ${query}.`);
} catch (error) {
if (error.message.includes('Sign in to confirm your age')) {
logger.debug(
`[Shard ${interaction.guild.shardId}] Found track but failed to retrieve audio due to age confirmation warning.`
);
return await interaction.editReply({
embeds: [
new EmbedBuilder()
@@ -110,6 +113,9 @@ module.exports = {
}
if (error.message.includes('The following content may contain graphic or violent imagery')) {
logger.debug(
`[Shard ${interaction.guild.shardId}] Found track but failed to retrieve audio due to graphic or violent imagery warning.`
);
return await interaction.editReply({
embeds: [
new EmbedBuilder()