From 9afb0e43762d3b35fc8a69e462d2210ef3289f94 Mon Sep 17 00:00:00 2001 From: nyagami Date: Sun, 12 May 2024 11:03:52 +0700 Subject: [PATCH] optional page param --- src/commands/General/plugins.ts | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/commands/General/plugins.ts b/src/commands/General/plugins.ts index c6817e7..5f03610 100644 --- a/src/commands/General/plugins.ts +++ b/src/commands/General/plugins.ts @@ -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", @@ -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)