oopsies
This commit is contained in:
parent
43a3fe4c25
commit
e16f5ecd5c
1 changed files with 2 additions and 2 deletions
|
@ -111,13 +111,13 @@ module.exports = {
|
||||||
const nsfw = interaction.options.getBoolean("nsfw") ?? false;
|
const nsfw = interaction.options.getBoolean("nsfw") ?? false;
|
||||||
|
|
||||||
await interaction.reply("Searching, please wait...");
|
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();
|
const startTime = process.hrtime.bigint();
|
||||||
|
|
||||||
var post = null;
|
var post = null;
|
||||||
while (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) {
|
if (newPost == null) {
|
||||||
await interaction.editReply("Could not find any post matching tags.");
|
await interaction.editReply("Could not find any post matching tags.");
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue