com.viber.bot.event.callback.OnMessageDelivered Maven / Gradle / Ivy
package com.viber.bot.event.callback;
import com.viber.bot.event.BotEventListener;
import com.viber.bot.event.incoming.IncomingDeliveredEvent;
import com.viber.bot.message.Message;
import java.util.concurrent.Future;
import static com.google.common.base.Preconditions.checkArgument;
public interface OnMessageDelivered extends BotEventListener {
void messageDelivered(IncomingDeliveredEvent event, Message message);
@Override
default Future emit(final Object... args) {
checkArgument(args.length == 2);
messageDelivered((IncomingDeliveredEvent) args[0], (Message) args[1]);
return nothing;
}
}