Class ContextCommand.User

Enclosing class:
ContextCommand

public abstract static class ContextCommand.User extends ContextCommand
  • Constructor Details

    • User

      public User()
  • Method Details

    • execute

      public abstract void execute(net.dv8tion.jda.api.events.interaction.command.UserContextInteractionEvent event)
      Abstract method that must be implemented for all User Context Commands.
      
       public class PingContextMenu extends ContextCommand.User {
      
          public PingContextMenu() {
       		this.setCommandData(Commands.user("Ping"));
          }
      
          @Override
          public void execute(UserContextInteractionEvent event) {
       		event.reply("Pong!").queue();
          }
       }