📝 Adding API context initialization to example code snippet
This commit is contained in:
parent
ffcdbd126e
commit
b83d77c78d
@ -50,7 +50,7 @@ Once done, you just need to create a `org.telegram.telegrambots.TelegramBotsApi`
|
|||||||
// Example taken from https://github.com/rubenlagus/TelegramBotsExample
|
// Example taken from https://github.com/rubenlagus/TelegramBotsExample
|
||||||
public class Main {
|
public class Main {
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
ApiContextInitializer.init();
|
||||||
TelegramBotsApi telegramBotsApi = new TelegramBotsApi();
|
TelegramBotsApi telegramBotsApi = new TelegramBotsApi();
|
||||||
try {
|
try {
|
||||||
telegramBotsApi.registerBot(new ChannelHandlers());
|
telegramBotsApi.registerBot(new ChannelHandlers());
|
||||||
|
Loading…
Reference in New Issue
Block a user