Skip to content

Commit

Permalink
optional page param
Browse files Browse the repository at this point in the history
  • Loading branch information
nyagami committed May 12, 2024
1 parent 7c905b6 commit 9afb0e4
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/commands/General/plugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,6 @@ export default class PluginsCommand {
) {}
@Slash({name: 'plugins'})
async plugins(
@SlashOption({
description: 'Page of request',
name: 'page',
type: ApplicationCommandOptionType.Integer,
required: true,
minValue: 1,
})
page: number,
@SlashChoice(...Object.values(languages))
@SlashOption({
description: "Filter plugins with language",
Expand All @@ -38,6 +30,13 @@ export default class PluginsCommand {
type: ApplicationCommandOptionType.String
})
keyword: string,
@SlashOption({
description: 'Page of request',
name: 'page',
type: ApplicationCommandOptionType.Integer,
minValue: 1,
})
page: number = 1,
interaction: CommandInteraction
) {
const pluginRepository = this.db.em.getRepository(Plugin)
Expand Down

0 comments on commit 9afb0e4

Please sign in to comment.