g
This commit is contained in:
parent
a9cf2be98b
commit
45590a74cb
1 changed files with 4 additions and 2 deletions
|
@ -124,14 +124,13 @@ module.exports = {
|
|||
|
||||
const tags = (interaction.options.getString("tags") ?? "").split(" ");
|
||||
const booru = interaction.options.getString("booru") ?? defaultBooru;
|
||||
const rating = (interaction.options.getString("rating") ?? ratings[0]);
|
||||
|
||||
var result = await knex.select("blacklist").from("blacklists").where("user", interaction.user.id).first();
|
||||
if (!result)
|
||||
result = { blacklist: '' };
|
||||
|
||||
const userBlacklist = (result.blacklist ?? "").trim().split(" ").filter(notEmpty);
|
||||
const searchTags = [rating, ...tags, ...[...blacklist, ...userBlacklist].map(i => "-" + i)];
|
||||
const searchTags = [...tags, ...[...blacklist, ...userBlacklist].map(i => "-" + i)];
|
||||
const startTime = process.hrtime.bigint();
|
||||
|
||||
var tries = 0;
|
||||
|
@ -148,6 +147,9 @@ module.exports = {
|
|||
const endTime = process.hrtime.bigint();
|
||||
const timeTaken = endTime - startTime;
|
||||
|
||||
if (post.booru.domain == "gelbooru.com" && post.rating == "s")
|
||||
post.rating = "q";
|
||||
|
||||
const fileName = (post.rating != "g" ? "SPOILER_" : "") + basename(post.fileUrl);
|
||||
const ext = extname(fileName).toLowerCase();
|
||||
|
||||
|
|
Loading…
Reference in a new issue