-
Notifications
You must be signed in to change notification settings - Fork 102
Expand file tree
/
Copy pathMain.java
More file actions
21 lines (18 loc) · 669 Bytes
/
Copy pathMain.java
File metadata and controls
21 lines (18 loc) · 669 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import org.telegram.telegrambots.ApiContextInitializer;
import org.telegram.telegrambots.TelegramBotsApi;
import org.telegram.telegrambots.exceptions.TelegramApiException;
public class Main {
public static void main(String[] args) {
// Initialize Api Context
ApiContextInitializer.init();
// Instantiate Telegram Bots API
TelegramBotsApi botsApi = new TelegramBotsApi();
// Register our bot
try {
botsApi.registerBot(new LoggingTestBot());
} catch (TelegramApiException e) {
e.printStackTrace();
}
System.out.println("LoggingTestBot successfully started!");
}
}