(interaction, guildConfig, client)
| 145 | .setDescription("Displays the help menu with all available commands"), |
| 146 | |
| 147 | async execute(interaction, guildConfig, client) { |
| 148 | |
| 149 | const { MessageFlags } = await import('discord.js'); |
| 150 | await InteractionHelper.safeDefer(interaction); |
| 151 | |
| 152 | const { embeds, components } = await createInitialHelpMenu(client); |
| 153 | |
| 154 | await InteractionHelper.safeEditReply(interaction, { |
| 155 | embeds, |
| 156 | components, |
| 157 | }); |
| 158 | |
| 159 | setTimeout(async () => { |
| 160 | try { |
| 161 | if (!InteractionHelper.isInteractionValid(interaction)) { |
| 162 | return; |
| 163 | } |
| 164 | |
| 165 | const closedEmbed = createEmbed({ |
| 166 | title: "Help menu closed", |
| 167 | description: "Help menu has been closed, use /help again.", |
| 168 | color: "secondary", |
| 169 | }); |
| 170 | |
| 171 | await InteractionHelper.safeEditReply(interaction, { |
| 172 | embeds: [closedEmbed], |
| 173 | components: [], |
| 174 | }); |
| 175 | } catch (error) { |
| 176 | |
| 177 | } |
| 178 | }, HELP_MENU_TIMEOUT_MS); |
| 179 | }, |
| 180 | }; |
nothing calls this directly
no test coverage detected