rubenlagus / TelegramBots

Java library to create bots using Telegram Bots API
https://telegram.me/JavaBotsApi
MIT License
4.77k stars 1.22k forks source link

Why do i get this error ? #234

Closed Pie133 closed 7 years ago

Pie133 commented 7 years ago

i just tried to lunch my bot i got this error why?

Exception in thread "main" com.google.inject.ConfigurationException: Guice configuration errors:

1) No implementation for org.telegram.telegrambots.generics.BotSession was bound. while locating org.telegram.telegrambots.generics.BotSession

1 error at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:1045) at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:1004) at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1054) at org.telegram.telegrambots.ApiContext.getInstance(ApiContext.java:25) at org.telegram.telegrambots.TelegramBotsApi.registerBot(TelegramBotsApi.java:121) at base.Main.main(Main.java:11)

and here is my main class

public class Main {

public static void main(String[] args) throws TelegramApiRequestException {
// write your code here
    TelegramBotsApi telegramBotsApi = new TelegramBotsApi();
    telegramBotsApi.registerBot(new bot());     // this is the error line 
}

}

Clevero commented 7 years ago

Duplicate of #161