if(!interaction.channel.nsfw&&!args.force)returninteraction.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`);
// Select random vid depending on the amount of MAX_CLIPS
for(leti=0;i<MAX_CLIPS;i++){
constrandom=Math.floor(Math.random()*mp4.length);
constvid=`./asset/ytp/userVid/${mp4[random]}`;
if(mp4[random].endsWith('mp4')){
if(!asset.includes(vid)){
asset.push(vid);
}
}
}
constloadingmsg=awaitinteraction.reply(`Processing, this can take a ***long*** time, i'll ping you when i finished <a:loadingmin:527579785212329984>\nSome info: There are currently ${mp4.length} videos.\nLike ytp? Why not check out https://ytp.namejeff.xyz/`);
returninteraction.reply({content:'Here is your YTP! Remember, it might contain nsfw, so be careful!',files:[`${os.tmpdir()}/${interaction.id}_YTP.mp4`]})
.catch(err=>{
console.error(err);
returninteraction.reply('Whoops, look like the vid might be too big for discord, my bad, please try again');