From 99079bcc7d30eaff430e9f42f6220e4481140233 Mon Sep 17 00:00:00 2001 From: Ashley Graves Date: Thu, 10 Oct 2024 15:41:50 +0200 Subject: [PATCH] gwah --- src/commands/fun/gelbooru.js | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/commands/fun/gelbooru.js b/src/commands/fun/gelbooru.js index 65cccca..869d9d5 100644 --- a/src/commands/fun/gelbooru.js +++ b/src/commands/fun/gelbooru.js @@ -134,15 +134,10 @@ module.exports = { const startTime = process.hrtime.bigint(); - var post = null; - while (post == null) { - var newPost = (await Booru.search(booru, searchTags, { limit: 1, random: true, credentials: credentials[booru] ?? null }))[0]; - if (newPost == null) { - await interaction.followUp("<:warning:1293874152150667315> Could not find any post matching tags."); - return; - } - if (/*!nsfw && isNSFWPost(newPost) || */isAIPost(newPost) || isFucked(newPost)) continue; - post = newPost; + var post = (await Booru.search(booru, searchTags, { limit: 1, random: true, credentials: credentials[booru] ?? null }))[0]; + if (post == null) { + await interaction.followUp("<:warning:1293874152150667315> Could not find any post matching tags."); + return; } const endTime = process.hrtime.bigint();