Well sure it does. You get a new pid assigned every time.
When you check it and see that it's not running, then your watchdog script just needs to run the command which starts your bot again after it crashed.
If your bot is running as a service, you might want to look into systemd; afaik you can set in a unit file that it automatically restarts a service.
I don`t think I explained it right.
When I run the script now the PID is 23423 and the script I will run on cron is going to be like waht you wrote above. But when I`m not around and the script dies. Your code will look for that PID but that PID will disappear and wont exist anymore.
So how can your code run a script automatically when the PID changes every time it runs?
What am I going to write at this part of your code exactly?
"pidof myprocess"