diff --git a/commands/fun/ytp.js b/commands/fun/ytp.js index c6bcec5..1530c08 100644 --- a/commands/fun/ytp.js +++ b/commands/fun/ytp.js @@ -9,10 +9,14 @@ const prefixs = prefix.split(','); export default { data: new SlashCommandBuilder() .setName('ytp') - .setDescription('Generate a YTP'), + .setDescription('Generate a YTP') + .addBooleanOption(option => + option.setName('force') + .setDescription('Force the generation of the video in non-nsfw channel.') + .setRequired(false)), category: 'fun', - async execute(interaction, arg) { - if (!interaction.channel.nsfw && !arg[0]) return interaction.reply(`Please execute this command in an NSFW channel ( Content might not be NSFW but since the video are user submitted better safe than sorry ) OR do \`\`${prefixs[0]}ytp --force\`\` to make the command work outside of nsfw channel BE AWARE THAT IT WON'T CHANGE THE FINAL RESULT SO NSFW CAN STILL HAPPEN`); + async execute(interaction, args) { + if (!interaction.channel.nsfw && !args[0]) return interaction.reply(`Please execute this command in an NSFW channel ( Content might not be NSFW but since the video are user submitted better safe than sorry ) OR do \`\`${prefixs[0]}ytp --force\`\` to make the command work outside of nsfw channel BE AWARE THAT IT WON'T CHANGE THE FINAL RESULT SO NSFW CAN STILL HAPPEN`); // Read userVid folder and select random vid and only take .mp4 const mp4 = []; @@ -46,7 +50,7 @@ export default { resources: './asset/ytp/resources/', temp: os.tmpdir(), sourceList: asset, - intro: arg[0] ? './asset/ytp/intro.mp4' : null, + intro: args[0] ? './asset/ytp/intro.mp4' : null, outro: './asset/ytp/outro.mp4', OUTPUT_FILE: `${os.tmpdir()}/${interaction.id}_YTP.mp4`, MAX_CLIPS: MAX_CLIPS,