Class Command.Category

java.lang.Object
com.jagrosh.jdautilities.command.Command.Category
Enclosing class:
Command

public static class Command.Category extends Object
To be used in Commands as a means of organizing commands into "Categories" as well as terminate command usage when the calling CommandEvent doesn't meet certain requirements.
Author:
John Grosh (jagrosh)
  • Constructor Details

  • Method Details

    • getName

      public String getName()
      Gets the name of the Category.
      Returns:
      The name of the Category
    • getFailureResponse

      public String getFailureResponse()
      Gets the failure response of the Category.
      Returns:
      The failure response of the Category
    • test

      public boolean test(CommandEvent event)
      Runs a test of the provided Predicate. Does not support SlashCommands.
      Parameters:
      event - The CommandEvent that was called when this method is invoked
      Returns:
      true if the Predicate was not set, was set as null, or was tested and returned true, otherwise returns false
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object