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.

@FunctionalInterface public interface CommandCondition
Functional interface representing a command condition.

This interface provides a single method to check if a command can be used.

  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    canUse(@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 command
      sender - the user who sent the command
      message - the message containing the command
      Returns:
      true if the command can be used, false otherwise