private Function<? super Method, Reply> returnReply(Object obj) {
    return method -> {
      try {
        return (Reply) method.invoke(obj);
      } catch (IllegalAccessException | InvocationTargetException e) {
        BotLogger.error("Could not add reply", TAG, e);
        throw propagate(e);
      }
    };
  }
private Function < ? super Method , Reply > returnReply ( Object obj ) { return method -> { try { return ( Reply ) method . invoke ( obj ) ; } catch ( IllegalAccessException | InvocationTargetException e ) { BotLogger . error ( "Could not add reply" , TAG , e ) ; throw propagate ( e ) ; } } ; }
Invokes the method and retrieves its return {@link Reply}.

@param obj an bot or extension that this method is invoked with
@return a {@link Function} which returns the {@link Reply} returned by the given method