The bot does not work when it is deployed on Heroku. The deployment itself is successful, but the bot does not respond to commands. There is a suspicion that incorrectly fill in pom.xml. What to do? The bot runs on LongPoll. Library - https://github.com/rubenlagus/TelegramBots In the code classes Main and Bot In Main, the bot is registered, the logic of the bot itself is described in Bot
Proclife file

worker: sh target/bin/workerBot 

pom.xml

 <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>TGBotShedule</groupId> <artifactId>ru.tlgrm.bot.shedule</artifactId> <version>1.0</version> <dependencies> <dependency> <groupId>org.telegram</groupId> <artifactId>telegrambots</artifactId> <version>4.2</version> </dependency> <dependency> <groupId>org.jetbrains</groupId> <artifactId>annotations</artifactId> <version>RELEASE</version> <scope>compile</scope> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.1</version> <configuration> <source>1.8</source> <target>1.8</target> </configuration> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>appassembler-maven-plugin</artifactId> <version>1.1.1</version> <configuration> <assembleDirectory>target</assembleDirectory> <programs> <program> <mainClass>Main</mainClass> <name>workerBot</name> </program> </programs> </configuration> <executions> <execution> <phase>package</phase> <goals> <goal>assemble</goal> </goals> </execution> </executions> </plugin> </plugins> </build> </project> 
  • Excuse me, why did you decide that the error was in pom.xml itself? - michael_best 7:23 pm
  • I had a similar problem: I ran the bot locally, I only answered one user. I stopped the bot in the cart, then restarted. Try it, maybe it will help - michael_best
  • On LAN, everything works fine, responds to requests from several users. It seems to me that the error may be exactly when assembling the file - cinilya1712
  • In addition, I can not decide whether I described <mainClass>Main</mainClass> - cinilya1712
  • @ cinilya1712 I would recommend putting a bot on a VPS server. Would recommend you to try DigitalOcean - Antonio112009

0