package org.telegram.telegrambots.bots; import org.telegram.telegrambots.meta.exceptions.TelegramApiRequestException; import org.telegram.telegrambots.meta.generics.LongPollingBot; import org.telegram.telegrambots.util.WebhookUtils; /** * @author Ruben Bermudez * @version 1.0 * Base abstract class for a bot that will get updates using * long-polling method */ public abstract class TelegramLongPollingBot extends DefaultAbsSender implements LongPollingBot { public TelegramLongPollingBot() { this(new DefaultBotOptions()); } public TelegramLongPollingBot(DefaultBotOptions options) { super(options); } @Override public void clearWebhook() throws TelegramApiRequestException { WebhookUtils.clearWebhook(this); } @Override public void onClosing() { exe.shutdown(); } }