Interface CommandErrorHandler

  • 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 CommandErrorHandler
    An interface called when an error is encountered.
    See Also:
    CommandException
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      reactor.core.publisher.Mono<Void> handle​(discord4j.core.event.domain.message.MessageCreateEvent event, Throwable error)
      Called when an error is encountered.
    • Method Detail

      • handle

        reactor.core.publisher.Mono<Void> handle​(discord4j.core.event.domain.message.MessageCreateEvent event,
                                                 Throwable error)
        Called when an error is encountered.
        Parameters:
        event - The event of where this error occurred.
        error - The error encountered. It should be noted that this throwable will be a subclass of CommandException if an error was due to end-user error, and not an internal issue. As a result it will usually contain a user-friendly message which can simply be reported to the author of the message attempting to invoke a command.