Added random choice of waifu, and removed one booru because non-safe images were being pulled
This commit is contained in:
parent
a0e4834213
commit
1220d939cb
|
@ -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"
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue