default to safebooru
This commit is contained in:
parent
043284a9ea
commit
4ddbb90ef6
1 changed files with 3 additions and 10 deletions
|
@ -14,7 +14,7 @@ for (const site of Object.keys(Booru.sites)) {
|
|||
})
|
||||
}
|
||||
|
||||
const defaultBooru = "gelbooru.com";
|
||||
const defaultBooru = "safebooru.org";
|
||||
|
||||
const data = new SlashCommandBuilder()
|
||||
.setName("booru")
|
||||
|
@ -29,15 +29,9 @@ const data = new SlashCommandBuilder()
|
|||
builder //
|
||||
.setName("booru")
|
||||
.setRequired(false)
|
||||
.setDescription("Booru board to search (default: gelbooru)")
|
||||
.setDescription("Booru board to search (default: safebooru.org)")
|
||||
.addChoices(boorus)
|
||||
)
|
||||
.addBooleanOption(builder =>
|
||||
builder //
|
||||
.setName("nsfw")
|
||||
.setRequired(false)
|
||||
.setDescription("Allow NSFW posts")
|
||||
)
|
||||
.setContexts([
|
||||
InteractionContextType.Guild,
|
||||
InteractionContextType.BotDM,
|
||||
|
@ -127,10 +121,9 @@ module.exports = {
|
|||
return;
|
||||
}
|
||||
const booru = interaction.options.getString("booru") ?? defaultBooru;
|
||||
const nsfw = interaction.options.getBoolean("nsfw") ?? false;
|
||||
|
||||
await interaction.deferReply();
|
||||
const searchTags = [...(nsfw ? [] : ["-rating:explicit", "-rating:sensitive", "-rating:questionable"]), ...tags, ...blacklist.map(i => "-" + i)];
|
||||
const searchTags = [...tags, ...blacklist.map(i => "-" + i)];
|
||||
|
||||
const startTime = process.hrtime.bigint();
|
||||
|
||||
|
|
Loading…
Reference in a new issue