small fixes
This commit is contained in:
@@ -11,9 +11,10 @@ export const commands = [
|
||||
subcommand
|
||||
.setName("drop")
|
||||
.setDescription("Drops one or multiple images using the rule34 API.")
|
||||
.addStringOption((option) => option
|
||||
.setName("limit")
|
||||
.setDescription("Post limitation")
|
||||
.addStringOption((option) =>
|
||||
option
|
||||
.setName("limit")
|
||||
.setDescription("Post limitation")
|
||||
)
|
||||
.addStringOption((option) =>
|
||||
option
|
||||
@@ -24,34 +25,27 @@ export const commands = [
|
||||
option
|
||||
.setName("page")
|
||||
.setDescription("Which page to query")
|
||||
)
|
||||
)
|
||||
.addStringOption((option) =>
|
||||
option
|
||||
.setName("pid")
|
||||
.setDescription("Which page to query")
|
||||
)
|
||||
),
|
||||
)
|
||||
),
|
||||
async execute(interaction: ChatInputCommandInteraction) {
|
||||
const limit = interaction.options.getString("limit")
|
||||
const tags = interaction.options.getString("tags")
|
||||
const page = interaction.options.getString("page")
|
||||
const pid = interaction.options.getString("pid")
|
||||
if (limit === null && tags === null && page === null && pid === null) {
|
||||
await interaction.reply({
|
||||
embeds: await requestWorker({
|
||||
limit: "1"
|
||||
})
|
||||
})
|
||||
} else {
|
||||
await interaction.reply({
|
||||
embeds: await requestWorker({
|
||||
limit: limit,
|
||||
tags: tags,
|
||||
page: page,
|
||||
pid: pid,
|
||||
}),
|
||||
})
|
||||
}
|
||||
const limit = interaction.options.getString("limit");
|
||||
const tags = interaction.options.getString("tags");
|
||||
const page = interaction.options.getString("page");
|
||||
const pid = interaction.options.getString("pid");
|
||||
|
||||
await interaction.reply({
|
||||
embeds: await requestWorker({
|
||||
limit: limit ?? "1",
|
||||
tags: tags,
|
||||
page: page,
|
||||
pid: pid,
|
||||
}),
|
||||
});
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user