How to use ApiContextInitializer and TelegramBotsApi()? #1292
Replies: 1 comment
-
Docs are now fully updated here |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, I am developing a Telegram Bot using the guide given here:
https://monsterdeveloper.gitbook.io/java-telegram-bot-tutorial/chapter1
One of the steps involves testing out our Telegram bot using a Main class. However, there are some problems:
The guide seems to use an older TelegramBot API (4.0.0), and I'm currently using a later build (6.8.0). From this build, it seems that many of the dependencies stipulated in the given guide are somewhat outdated (due to having different filepaths).
I can't seem to find the "ApiContextInitializer" directory. I assume this file has been refactored or removed during a release of the TelegramBots dependency? If so, may I ask what classes have replaced its role?
In addition, the guide uses an older version of TelegramBotsApi (where nothing is required for its constructor. But the new constructor seems to require a BotSession instance. If I want to, let's just say, get the bot to respond to my message, what class do I use/create?
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions