Regards. I am doing a bot with jtelegrambot and if I go out and restart the application when initializing the bot it tells me that it is running on another thread. How can I stop it? Thank you.
Alternatively, you could kill the app through Task Manager (in Windows), but if you are running multiple jar processes, it would be hard to tell which process to kill.
no. Sorry, my fault! IT is a nonui app... i just have the IDE open to see the LOG...
So, stopping the Bot must use the usually way to kill the java process.
Alternatively you can use a "Special" command to send to the bot. If the bot receives this command from a specific UID then the bot can be stopped by jtb.Stop and then calling exitapplication.