za.co.knonchalant.candogram.IBotAPI Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of CanDoGram Show documentation
Show all versions of CanDoGram Show documentation
Wraps Telegram and Discord bot API, so you can code once and deploy multi.
The newest version!
package za.co.knonchalant.candogram;
import com.pengrad.telegrambot.model.request.InlineKeyboardMarkup;
import com.pengrad.telegrambot.model.request.Keyboard;
import com.pengrad.telegrambot.model.request.ParseMode;
import za.co.knonchalant.candogram.handlers.*;
import java.util.List;
public interface IBotAPI {
List getHandlers();
void setInlineHandler(IInlineHandler handler);
IInlineHandler getInlineHandler();
void addHandler(IMessageHandler handler);
void addHandlers(List handler);
List getUpdates(Integer limit);
void sendMessage(T message, String text, Object... args);
void sendMessage(T message, String text);
void sendMessageWithKeyboard(IUpdate update, List> keyboardList, String text);
boolean typing(IUpdate update);
void sendMessage(Long chatId, String message, ParseMode parseMode, boolean disableWebPagePreview, Integer messageId, Keyboard keyboard);
void updateMessage(Long chatId, String message, Integer messageId, InlineKeyboardMarkup keyboard);
void setOffset(int updateId);
List getChatUsers(long chatId);
void sendInlinePhoto(String inlineId, String photoUrl, String thumbnailUrl, int width, int height);
void sendPhoto(T chat, byte[] photoUrl);
void sendAnimation(String chatId, byte[] photoUrl);
String getName();
boolean supportsUpdateListener();
void registerUpdateListener(IBotUpdatesHandler handler);
void unregisterUpdateListener();
}