(interaction, config, client)
| 55 | ), |
| 56 | |
| 57 | async execute(interaction, config, client) { |
| 58 | const wrappedExecute = withErrorHandling(async () => { |
| 59 | const subcommand = interaction.options.getSubcommand(); |
| 60 | const guild = interaction.guild; |
| 61 | |
| 62 | switch (subcommand) { |
| 63 | case "setup": |
| 64 | return await handleSetup(interaction, guild, client); |
| 65 | case "dashboard": |
| 66 | return await autoVerifyDashboard.execute(interaction, config, client); |
| 67 | default: |
| 68 | throw createError( |
| 69 | `Unknown subcommand: ${subcommand}`, |
| 70 | ErrorTypes.VALIDATION, |
| 71 | "Invalid subcommand selected.", |
| 72 | { subcommand } |
| 73 | ); |
| 74 | } |
| 75 | }, { command: 'autoverify', subcommand: interaction.options.getSubcommand() }); |
| 76 | |
| 77 | return await wrappedExecute(interaction, config, client); |
| 78 | } |
| 79 | }; |
| 80 | |
| 81 | async function handleSetup(interaction, guild, client) { |
nothing calls this directly
no test coverage detected