init static method

void init(
  1. String token,
  2. int chatID
)

Implementation

static void init(String token, int chatID) async {
  if (teledart == null) {
    TelegramBot.chatId = chatID;
    final username = (await Telegram(token).getMe()).username;
    var event = Event(username ?? "");
    teledart = TeleDart(token, event);
    teledart!.start();
  }
}