From eb28545cbded1f52f06ca1b96c3ffb3e77543ecb Mon Sep 17 00:00:00 2001 From: loicbersier Date: Mon, 7 Sep 2020 17:28:42 +0200 Subject: [PATCH] Remove the message and spoiler if executed in a nsfw channel Signed-off-by: loicbersier --- commands/fun/petittube.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/fun/petittube.js b/commands/fun/petittube.js index e713172..ac6cffc 100644 --- a/commands/fun/petittube.js +++ b/commands/fun/petittube.js @@ -24,7 +24,7 @@ class PetitTubeCommand extends Command { const url = $('iframe')[0].attribs.src; - this.client.commandHandler.runCommand(message, this.client.commandHandler.findCommand('download'), { link: new URL(url), proxy: 1, spoiler: true, caption: 'Video might be NSFW as always, be careful!'}); + this.client.commandHandler.runCommand(message, this.client.commandHandler.findCommand('download'), { link: new URL(url), proxy: 1, spoiler: !message.channel.nsfw, caption: message.channel.nsfw ? '' : 'Video might be NSFW as always, be careful!'}); } } module.exports = PetitTubeCommand; \ No newline at end of file