-
Notifications
You must be signed in to change notification settings - Fork 0
Instantiation
pharastar.dev edited this page Nov 24, 2022
·
1 revision
import tech.digitaldojo.jtba.TelegramBot;
public class MyProject {
private static TelegramBot bot;
public static void main(String[] args) {
if (args.length < 1) throw new IllegalArgumentException("Token cannot be null please insert it as first program argument.");
String token = args[0];
// creates a bot with polling active ( fetching updates all 300ms )
bot = new TelegramBot(token);
}
}