Class CommandHandler

    • Method Detail

      • getCommand

        @NonNull
        public abstract java.lang.String getCommand()
        Returns:
        A slash command. E.g. /help
      • canHandle

        public boolean canHandle​(@Nullable
                                 TelegramBotConfiguration bot,
                                 @NonNull @NotNull
                                 @NotNull Update input)
        Description copied from interface: Handler
        Returns true if the handler can dispatch the current request.
        Specified by:
        canHandle in interface Handler<TelegramBotConfiguration,​Update,​SendMessage>
        Parameters:
        bot - bot being asked to handle this command
        input - input to the request handler
        Returns:
        true if the handler is capable of handling the current request
      • getOrder

        public int getOrder()
        Specified by:
        getOrder in interface io.micronaut.core.order.Ordered