public interface Module
| Modifier and Type | Method and Description |
|---|---|
ModuleInfo |
getModuleInfo() |
java.lang.Class<? extends State> |
getStateType() |
void |
initialize(State state)
This function is called when you module is first loaded by the framework
|
void |
postLoad(Bot bot)
This function will be executed just after your module was loaded by a bot.
|
void |
postUnload(Bot bot)
This function will be executed after your module was unloaded.
|
void |
preLoad(Bot bot)
This function will be executed just before your module will be loaded by a bot.
|
void |
preUnload(Bot bot)
This function will be executed just before your module will be unloaded.
|
void |
processUpdate(Bot sender,
org.telegram.telegrambots.api.objects.Update update)
This function will be executed when telegram has an update.
|
State |
saveState(Bot bot)
This method is called when the bot wants you to save.
|
ModuleInfo getModuleInfo()
void initialize(State state)
state - the state last returned by the save function or null, if no previous state has been foundvoid preLoad(Bot bot)
void postLoad(Bot bot)
void processUpdate(Bot sender, org.telegram.telegrambots.api.objects.Update update)
sender - is the bot that sent the updateupdate - is the update from telegramvoid preUnload(Bot bot)
void postUnload(Bot bot)
State saveState(Bot bot)
bot - the bot that wants you to savejava.lang.Class<? extends State> getStateType()