Deploying a discordjs bot and autorestarting on fails

I am wanting to deploy my discord bot in I am ok with everything. But I have some confusions about auto restarting. We know that discordjs doesn’t open any webserver, it just uses websockets, and afaik restarting system depends on ports. So, how can I set flyio like that so that if discordjs bot exits automatically, is going to auto restart that?

Hi @MohammadKH

Have you taken a look at TCP checks (App Configuration (fly.toml) · Fly Docs) instead of HTTP checks?
That will probably work with websockets.