Package my.uum
Class MalaysiaWeatherBot
java.lang.Object
org.telegram.telegrambots.meta.bots.AbsSender
org.telegram.telegrambots.bots.DefaultAbsSender
org.telegram.telegrambots.bots.TelegramLongPollingBot
my.uum.MalaysiaWeatherBot
- All Implemented Interfaces:
org.telegram.telegrambots.meta.generics.LongPollingBot,org.telegram.telegrambots.meta.generics.TelegramBot
public class MalaysiaWeatherBot
extends org.telegram.telegrambots.bots.TelegramLongPollingBot
Telegram bot for providing weather updates in Malaysia.
-
Field Summary
Fields inherited from class org.telegram.telegrambots.bots.DefaultAbsSender
exe -
Constructor Summary
ConstructorsConstructorDescriptionConstructor to initialize the bot with necessary services. -
Method Summary
Modifier and TypeMethodDescriptionReturns the bot's username.voidonUpdateReceived(org.telegram.telegrambots.meta.api.objects.Update update) Handles incoming updates from Telegram.Methods inherited from class org.telegram.telegrambots.bots.TelegramLongPollingBot
clearWebhook, onClosingMethods inherited from class org.telegram.telegrambots.bots.DefaultAbsSender
downloadFile, downloadFile, downloadFile, downloadFile, downloadFileAsStream, downloadFileAsStream, downloadFileAsync, downloadFileAsync, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, executeAsync, executeAsync, executeAsync, executeAsync, executeAsync, executeAsync, executeAsync, executeAsync, executeAsync, executeAsync, executeAsync, executeAsync, executeAsync, executeAsync, executeAsync, getBaseUrl, getBotToken, getOptions, sendApiMethod, sendApiMethodAsync, sendApiMethodAsyncMethods inherited from class org.telegram.telegrambots.meta.bots.AbsSender
execute, executeAsync, executeAsync, getMe, getMeAsync, getMeAsync, getWebhookInfo, getWebhookInfoAsync, getWebhookInfoAsyncMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.telegram.telegrambots.meta.generics.LongPollingBot
getOptions, onUpdatesReceivedMethods inherited from interface org.telegram.telegrambots.meta.generics.TelegramBot
getBotToken, onRegister
-
Constructor Details
-
MalaysiaWeatherBot
public MalaysiaWeatherBot()Constructor to initialize the bot with necessary services.
-
-
Method Details
-
onUpdateReceived
public void onUpdateReceived(org.telegram.telegrambots.meta.api.objects.Update update) Handles incoming updates from Telegram.- Parameters:
update- the update received from Telegram
-
getBotUsername
Returns the bot's username.- Returns:
- the bot's username
-