My first Java bot!

package Mybot;

import Mybot.bot.Bot;
import org.telegram.telegrambots.meta.TelegramBotsApi;
import org.telegram.telegrambots.meta.exceptions.TelegramApiException;
import org.telegram.telegrambots.updatesreceivers.DefaultBotSession;

import java.time.format.DateTimeFormatter;

public class Main {
public static DateTimeFormatter formatter = DateTimeFormatter.ofPattern(“dd-MM-yyyy HH:mm”);

public static void main(String[] args) throws TelegramApiException {
    TelegramBotsApi telegramBotsApi = new TelegramBotsApi(DefaultBotSession.class);
    telegramBotsApi.registerBot(new Bot());
}

Hi there @Odilxon_Abdullayev :wave:

Are you sharing your bot with us, or were you looking for some sort of help? Let us know, thanks!

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.