Interface BotStartTrigger
public interface BotStartTrigger
Callback interface invoked once after the bot has started and successfully authenticated
with the Telegram Bot API.
Implement this interface to perform post-startup initialization such as setting up
bot commands, sending notifications, or scheduling background tasks.
- Since:
- 0.0.1
- Author:
- Islom Mirsaburov
-
Method Summary
Modifier and TypeMethodDescriptionvoidexecute(org.telegram.telegrambots.meta.api.objects.User bot, org.telegram.telegrambots.meta.generics.TelegramClient telegramClient) Executes post-startup logic using the authenticated bot's metadata and API client.
-
Method Details
-
execute
void execute(org.telegram.telegrambots.meta.api.objects.User bot, org.telegram.telegrambots.meta.generics.TelegramClient telegramClient) Executes post-startup logic using the authenticated bot's metadata and API client.- Parameters:
bot- theUserobject representing the authenticated bot; must not benulltelegramClient- the client used to issue API requests to the Telegram Bot API; must not benull
-