- First of all, you have to register your bot to the @BotFather which you can find in telegram. Then, if you have the username and token of the bot, you should set these authorization data into Bot.java
@Override
public String getBotUsername() {
return "yoursUsername";
}
@Override
public String getBotToken() {
return "yoursToken";
}
- Run the database container
cd docker/
docker-compose up -d
- Build the project by maven
mvn install
- Run the bot
java -jar target/telebot-1.0-SNAPSHOT.jar
- Enjoy!