Interface EntitySelectMenuHandler


public interface EntitySelectMenuHandler
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    handleEntitySelectMenu(net.dv8tion.jda.api.events.interaction.component.EntitySelectInteractionEvent event, List<net.dv8tion.jda.api.entities.IMentionable> values)
    Method that must be overriden for all classes that handle EntitySelectInteraction All select menus that match the identifier will execute this class's implementation of the handleEntitySelectMenu(EntitySelectInteractionEvent, List) method.
  • Method Details

    • handleEntitySelectMenu

      void handleEntitySelectMenu(@Nonnull net.dv8tion.jda.api.events.interaction.component.EntitySelectInteractionEvent event, @Nonnull List<net.dv8tion.jda.api.entities.IMentionable> values)
      Method that must be overriden for all classes that handle EntitySelectInteraction All select menus that match the identifier will execute this class's implementation of the handleEntitySelectMenu(EntitySelectInteractionEvent, List) method.
           invalid input: '{@code
       public class TestCommand extends SlashCommand implements EntitySelectMenuHandler {
      
           public TestCommand() {
               setSlashCommandData(Commands.slash("test", "test description"));
           }
      
          @Override
          public void execute(SlashCommandInteractionEvent event) {
       		//Build your select menu here.
          }
      
          @Override
          public void handleEntitySelectMenu(EntitySelectInteractionEvent event, List<IMentionable> values) {
              for (IMentionable entity : values) {
                  event.getChannel().sendMessage(String.format("Mention: %s", entity.getAsMention())
              }
        }
       }
       </pre>
      
       @param event the {@link EntitySelectInteractionEvent} instance.
       @param values the values that you could select.'