Answer the question
In order to leave comments, you need to log in
Why doesn't maven find ApiContextInitializer from Telegram bots api?
Following the instructions on the net, I created an idea project with maven support and added the dependency to pom.xml
<dependencies>
<dependency>
<groupId>org.telegram</groupId>
<artifactId>telegrambots</artifactId>
<version>5.1.1</version>
</dependency>
</dependencies>
Answer the question
In order to leave comments, you need to log in
Well, apparently this class was removed in the version you specified.
Here are the details:
https://github.com/rubenlagus/TelegramBots/wiki/Ho...
ApiContextInitializer.init(); has been removed and is not required anymore, instead:
TelegramBotsApi telegramBotsApi = new TelegramBotsApi(DefaultBotSession.class);
// When using webhook, create your own version of DefaultWebhook with all your parameters set.
TelegramBotsApi telegramBotsApi = new TelegramBotsApi(DefaultBotSession.class, defaultWebhookInstance);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question