Since I put my bot on an unmanaged host, it auto-starts with index.js and i'm not able to run deploy-commands myself, I decided to make the whole file a function and call it in of index,js . However, when doing so, it starts deploying, errors, but because of the catch{} it then finishes deploying and turns on. I was wondering how I could fix the error entirely. I attached the error and the relevant index.js code.