From 50f4157648787dde248d8bf8683b905b5e3fef23 Mon Sep 17 00:00:00 2001 From: Marius Begby Date: Sun, 23 Jul 2023 12:02:25 +0200 Subject: [PATCH] fix: add logging for youtube confirmation errors --- src/commands/player/play.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/commands/player/play.js b/src/commands/player/play.js index a353a0c..861c0b2 100644 --- a/src/commands/player/play.js +++ b/src/commands/player/play.js @@ -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()