Search in sources :

Example 1 with MessageCommandFailureEvent

use of won.bot.framework.eventbot.event.impl.command.MessageCommandFailureEvent in project webofneeds by researchstudio-sat.

the class LogMessageCommandFailureAction method doRun.

@Override
protected void doRun(Event event, EventListener executingListener) throws Exception {
    MessageCommandFailureEvent failureEvent = (MessageCommandFailureEvent) event;
    String command = failureEvent.getOriginalCommandEvent().getClass().getSimpleName();
    String message = failureEvent.getMessage();
    if (message != null) {
        logger.error("Message command {} failed. Message: {}", command, message);
    } else {
        logger.error("Message command {} failed", command);
    }
}
Also used : MessageCommandFailureEvent(won.bot.framework.eventbot.event.impl.command.MessageCommandFailureEvent)

Aggregations

MessageCommandFailureEvent (won.bot.framework.eventbot.event.impl.command.MessageCommandFailureEvent)1