avamaxboobs
Version:
A package for randomly selecting images of various people's boobs. Intended to be used for discord bot commands.
33 lines (31 loc) • 1.41 kB
JavaScript
const fs =require('fs');
const path = require('path');
/**
* Get a random picture of Tessa Fowler's boobs 😳
* @param {boolean} withbra Whether or not only images of Tessa Fowler with a bra should be used. Defaults to false, meaning most of the returned images will be NSFW
* @returns {Promise<string>} random picture of Tessa Fowler's boobs 😳
* @example const tessafowlerboob = await tessafowlerboobs()
*/
async function tessafowlerboobs(withbra=false){
if(typeof withbra!='boolean' || withbra===null){
throw new Error('Oi dipshit, withbra must be a boolean!')
}else{
if(!withbra){
const file = fs.readFileSync(path.join(__dirname.slice(0,__dirname.length-21),'lists','tessafowlerboobs.json'));
const keys = Object.keys(JSON.parse(file.toString()))
const val = JSON.parse(file.toString())[keys]
const tessboob = val[Math.floor(Math.random()*val.length)];
return tessboob;
}
if(withbra){
const file = fs.readFileSync(path.join(__dirname.slice(0,__dirname.length-21),'lists','tessafowlerwithabra.json'));
const keys = Object.keys(JSON.parse(file.toString()))
const val = JSON.parse(file.toString())[keys]
const tesswbra = val[Math.floor(Math.random()*val.length)];
return tesswbra;
}
}
}
module.exports={
tessafowlerboobs
}