From e16f5ecd5c9322ccaf91b49a788ce644f664a482 Mon Sep 17 00:00:00 2001 From: Ashley Graves Date: Thu, 10 Oct 2024 11:19:49 +0200 Subject: [PATCH] oopsies --- src/commands/fun/gelbooru.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commands/fun/gelbooru.js b/src/commands/fun/gelbooru.js index e554c72..f00af46 100644 --- a/src/commands/fun/gelbooru.js +++ b/src/commands/fun/gelbooru.js @@ -111,13 +111,13 @@ module.exports = { const nsfw = interaction.options.getBoolean("nsfw") ?? false; await interaction.reply("Searching, please wait..."); - tags = [...(nsfw ? [] : ["-rating:explicit", "-rating:questionable"]), ...tags]; + const searchTags = [...(nsfw ? [] : ["-rating:explicit", "-rating:questionable"]), ...tags]; const startTime = process.hrtime.bigint(); var post = null; while (post == null) { - var newPost = (await Booru.search(booru, tags, { limit: 1, random: true, credentials: credentials[booru] ?? null }))[0]; + var newPost = (await Booru.search(booru, searchTags, { limit: 1, random: true, credentials: credentials[booru] ?? null }))[0]; if (newPost == null) { await interaction.editReply("Could not find any post matching tags."); return;