- maven
- java 11
- telegram bot library for java(https://github.com/rubenlagus/TelegramBots)
- Responds to user with the same text(echo effect)
- Create bot via BotFather (
t.me/BotFather
) - Specify
token
andusername
inSimpleEchoBot.java
- Run
Application.main()
- Wait for message
Telegram bot is ready to accept updates from user......
- Now navigate to your bot and try to send some text to the bot
SimpleEchoBot.java
contains onUpdateReceived()
- entrypoint, in which bot receives messages from Telegram.
Try to look at the code and play with it.