1
0
Fork 0

Added random choice of waifu, and removed one booru because non-safe images were being pulled

This commit is contained in:
grumbulon 2022-04-05 00:18:49 -04:00
parent a0e4834213
commit 1220d939cb
2 changed files with 10 additions and 2 deletions

View File

@ -1,5 +1,6 @@
{
"booru": ["danbooru", "safebooru", "konan"],
"tags": ["onodera_kosaki", "-underwear"],
"booru": ["danbooru", "safebooru"],
"characterTags": ["onodera_kosaki", "tohsaka_rin", "izumi_konata"],
"tags": ["-underwear"],
"rating": "safe"
}

View File

@ -10,10 +10,17 @@ export function getFromBooru() {
console.log(err);
return;
}
//append safe rating to the tags if so desired
if (config.rating === "safe") {
config.tags.push("rating:safe");
}
//Select a random index from the array and append the waifu to the tags
const randWaifu = Math.floor(Math.random() * config.characterTags.length);
config.tags.push(config.characterTags[randWaifu]);
//Select a random index from the array to pick which booru is being queried
const randBooru = Math.floor(Math.random() * config.booru.length);
search(config.booru[randBooru], config.tags, {
limit: 1,