Package com.jtelegram.api.commands
Interface CommandHandler
-
- All Superinterfaces:
CommandFilter
public interface CommandHandler extends CommandFilter
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidonCommand(TextMessageEvent event, Command command)Runs this command.default booleantest(TextMessageEvent event, Command command)Checks to see if the given event and command test to betrueaccording to this filter.
-
-
-
Method Detail
-
onCommand
void onCommand(TextMessageEvent event, Command command)
Runs this command.- Parameters:
event- The event containing the commandcommand- The command being run
-
test
default boolean test(TextMessageEvent event, Command command)
Description copied from interface:CommandFilterChecks to see if the given event and command test to betrueaccording to this filter.- Specified by:
testin interfaceCommandFilter- Parameters:
event- The event to be testedcommand- The command data executed in this event- Returns:
- True if and only if this filter allows this event and command combination to go ahead.
-
-