From 215d36e9e4b3e902449fa28e088d306e2d4d1f7c Mon Sep 17 00:00:00 2001 From: Marius Begby Date: Wed, 26 Jul 2023 18:35:01 +0200 Subject: [PATCH] fix: handle "all" yt warnings requiring confirmations --- src/commands/player/play.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/commands/player/play.js b/src/commands/player/play.js index 1a55b8e2..eab16561 100644 --- a/src/commands/player/play.js +++ b/src/commands/player/play.js @@ -162,15 +162,15 @@ module.exports = { }); } - if (error.message.includes('The following content may contain graphic or violent imagery')) { + if (error.message.includes('The following content may contain')) { logger.debug( - `[Shard ${interaction.guild.shardId}] Found track but failed to retrieve audio due to graphic or violent imagery warning.` + `[Shard ${interaction.guild.shardId}] Found track but failed to retrieve audio due to graphic/mature/sensitive topic warning.` ); return await interaction.editReply({ embeds: [ new EmbedBuilder() .setDescription( - `**${embedOptions.icons.warning} Cannot retrieve audio for track**\nThis audio source cannot be played as the video source has a warning for graphic or violent imagery. It requires a manual confirmation to to play the video, and because of this I am unable to extract the audio for this source.\n\n_If you think this message is incorrect, please submit a bug report in the **[support server](${botOptions.serverInviteUrl})**._` + `**${embedOptions.icons.warning} Cannot retrieve audio for track**\nThis audio source cannot be played as the video source has a warning for graphic or sensistive topics. It requires a manual confirmation to to play the video, and because of this I am unable to extract the audio for this source.\n\n_If you think this message is incorrect, please submit a bug report in the **[support server](${botOptions.serverInviteUrl})**._` ) .setColor(embedOptions.colors.warning) ]