Interface CommandCondition
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Functional interface representing a command condition.
This interface provides a single method to check if a command can be used.
-
Method Summary
Modifier and TypeMethodDescriptionbooleancanUse(@NotNull TelegramBot bot, @NotNull User sender, @NotNull Message message) Checks if a command can be used by a specific user in a specific message context.
-
Method Details
-
canUse
boolean canUse(@NotNull @NotNull TelegramBot bot, @NotNull @NotNull User sender, @NotNull @NotNull Message message) Checks if a command can be used by a specific user in a specific message context.- Parameters:
bot- the bot that received the commandsender- the user who sent the commandmessage- the message containing the command- Returns:
- true if the command can be used, false otherwise
-