title: Application (Slash) Command says "The application did not respond" when replying with Components
body: <p>Following the guide I found on the <a href="https://discordnet.dev/guides/int_basics/message-components/select-menus.html" rel="nofollow noreferrer">Discord.Net documentation site</a>, I've built a command with the following definition:</p>
  <pre class="lang-vb prettyprint-override"><code>Imports Discord
  Imports Discord.Interactions
  
  Public Class TestCommands
      Inherits InteractionModuleBase(Of SocketInteractionContext)
  
      Public Property Commands As InteractionService
      Private _handler As CommandHandler
  
      Public Sub New(ByVal handler As CommandHandler)
          _handler = handler
      End Sub
  
      &lt;SlashCommand(&quot;faq&quot;, &quot;View frequently asked questions&quot;)&gt;
      Public Async Function FAQ() As Task
          Dim FAQMenu As New SelectMenuBuilder
          Dim FAQSelect As New ComponentBuilder
  
          With FAQMenu
              .WithPlaceholder(&quot;What's your question?&quot;)
              .WithCustomId(&quot;faq_menu&quot;)
              .WithMinValues(1)
              .WithMaxValues(1)
              .AddOption(&quot;Question #1?&quot;, &quot;faq1&quot;)
              .AddOption(&quot;Question #2?&quot;, &quot;faq2&quot;)
              .AddOption(&quot;Question #3?&quot;, &quot;faq3&quot;)
              .AddOption(&quot;Question #4?&quot;, &quot;faq4&quot;)
          End With
  
          FAQSelect.WithSelectMenu(FAQMenu)
  
          Await ReplyAsync(&quot;Select one of the following Frequently Asked Questions:&quot;, components:=FAQSelect.Build)
      End Function
  End Class
  </code></pre>
  <p>When I run my bot and type <code>/faq</code> in my Discord client, it correctly displays my selection menu, but right above it I see a message saying &quot;The application did not respond&quot;</p>
  <p><a href="https://i.stack.imgur.com/BApse.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BApse.png" alt="Screenshot of issue" /></a></p>
  <p>I'm guessing that the bot is waiting for the selection, and I understand that there's a short timeout for the bot to receive input, but I definitely don't want my users to see that and think that there's a problem with the bot. Is there a better way to post the select menu component to prevent this message from popping up?</p>
  <p><strong>EDIT:</strong> Sorry, I forgot to include the <code>CommandHandler</code> object definition. Perhaps <em>that's</em> where the timeout is occurring. There's a lot of unfinished code in here, but maybe it'll help diagnose why I'm getting this message:</p>
  <pre class="lang-vb prettyprint-override"><code>Imports System.Reflection
  Imports Microsoft.Extensions.Configuration
  Imports Discord
  Imports Discord.Interactions
  Imports Discord.WebSocket
  Imports Ichthus.Bot
  
  Public Class CommandHandler
      Private ServerLogChannel As UInt64 = 0
  
      Public Async Function InitializeAsync() As Task
          ' add the public modules that inherit InteractionModuleBase&lt;T&gt; to the InteractionService
          Await Settings.BotCommands.AddModulesAsync(Assembly.GetEntryAssembly(), Settings.BotProvider)
  
          ' process the InteractionCreated payloads to execute Interactions commands
          AddHandler Settings.Bot.InteractionCreated, AddressOf HandleInteraction
          AddHandler Settings.Bot.ButtonExecuted, AddressOf HandleButton
          AddHandler Settings.Bot.SelectMenuExecuted, AddressOf HandleMenu
  
          ' process the command execution results
          AddHandler Settings.BotCommands.SlashCommandExecuted, AddressOf SlashCommandExecuted
          AddHandler Settings.BotCommands.ContextCommandExecuted, AddressOf ContextCommandExecuted
          AddHandler Settings.BotCommands.ComponentCommandExecuted, AddressOf ComponentCommandExecuted
      End Function
  
      Private Function ComponentCommandExecuted(ByVal Command As ComponentCommandInfo, ByVal Context As IInteractionContext, ByVal Result As IResult) As Task
          If Not Result.IsSuccess Then
              Select Case Result.[Error]
                  Case InteractionCommandError.UnmetPrecondition
  
                  Case InteractionCommandError.UnknownCommand
  
                  Case InteractionCommandError.BadArgs
  
                  Case InteractionCommandError.Exception
  
                  Case InteractionCommandError.Unsuccessful
  
                  Case Else
  
              End Select
          End If
  
          Return Task.CompletedTask
      End Function
  
      Private Function ContextCommandExecuted(ByVal Command As ContextCommandInfo, ByVal Context As IInteractionContext, ByVal Result As IResult) As Task
          If Not Result.IsSuccess Then
              Select Case Result.[Error]
                  Case InteractionCommandError.UnmetPrecondition
  
                  Case InteractionCommandError.UnknownCommand
  
                  Case InteractionCommandError.BadArgs
  
                  Case InteractionCommandError.Exception
  
                  Case InteractionCommandError.Unsuccessful
  
                  Case Else
  
              End Select
          End If
  
          Return Task.CompletedTask
      End Function
  
      Private Function SlashCommandExecuted(ByVal Command As SlashCommandInfo, ByVal Context As IInteractionContext, ByVal Result As IResult) As Task
          If Not Result.IsSuccess Then
              Select Case Result.[Error]
                  Case InteractionCommandError.UnmetPrecondition
  
                  Case InteractionCommandError.UnknownCommand
  
                  Case InteractionCommandError.BadArgs
  
                  Case InteractionCommandError.Exception
  
                  Case InteractionCommandError.Unsuccessful
  
                  Case Else
  
              End Select
          End If
  
          Return Task.CompletedTask
      End Function
  
      Private Async Function HandleInteraction(ByVal Interaction As SocketInteraction) As Task
          Try
              ' create an execution context that matches the generic type parameter of your InteractionModuleBase&lt;T&gt; modules
              Dim Context As New SocketInteractionContext(Settings.Bot, Interaction)
              Dim Result As IResult = Await Settings.BotCommands.ExecuteCommandAsync(Context, Settings.BotProvider)
  
              If Not Result.IsSuccess Then
                  Select Case Result.[Error]
                      Case InteractionCommandError.UnmetPrecondition
  
                      Case Else
  
                  End Select
              End If
          Catch ex As Exception
              Console.WriteLine(ex)
  
              ' if a Slash Command execution fails it is most likely that the original interaction acknowledgment will persist. It is a good idea to delete the original
              ' response, or at least let the user know that something went wrong during the command execution.
              If Interaction.Type = InteractionType.ApplicationCommand Then
                  Interaction.GetOriginalResponseAsync().ContinueWith(Function(msg) msg.Result.DeleteAsync()).Wait()
              End If
          End Try
      End Function
  
      Private Async Function HandleMenu(ByVal Selection As SocketMessageComponent) As Task
          For Each Selected As String In Selection.Data.Values
              Select Case Selected
                  Case &quot;faq1&quot;
                      Await Selection.RespondAsync(&quot;Response #1.&quot;)
                  Case &quot;faq2&quot;
                      Await Selection.RespondAsync(&quot;Response #2.&quot;)
                  Case &quot;faq3&quot;
                      Await Selection.RespondAsync(&quot;Response #3.&quot;)
                  Case &quot;faq4&quot;
                      Await Selection.RespondAsync(&quot;Response #4.&quot;)
                  Case Else
                      Await Selection.RespondAsync($&quot;{Selection.User.Mention} has selected something I don't recognize&quot;)
              End Select
          Next Selected
      End Function
  
      Private Async Function HandleButton(ByVal Button As SocketMessageComponent) As Task
          Select Case Button.Data.CustomId
              Case &quot;faq1&quot;
                  Await Button.RespondAsync($&quot;{Button.User.Mention} has clicked the first button&quot;)
              Case &quot;faq2&quot;
                  Await Button.RespondAsync($&quot;{Button.User.Mention} has clicked the second button&quot;)
              Case &quot;faq3&quot;
                  Await Button.RespondAsync($&quot;{Button.User.Mention} has clicked the third button&quot;)
              Case Else
                  Await Button.RespondAsync($&quot;{Button.User.Mention} has clicked something I don't recognize&quot;)
          End Select
      End Function
  End Class
  
  </code></pre>