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.
#Deploying via index.js errors but works.
11 messages · Page 1 of 1 (latest)
• What's your exact discord.js npm list discord.js and node node -v version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.
discord.js: 14.11.0
node: 20.2.0
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
you could run it yourself on your computer rather than on your host
but to address your actual error, it's likely you didn't actually export a function fromdeploy-commandsand are just expecting it to be "call this function to run this file"
then it sounds like you didn't export it
but again, you could just side step the whole issue by running yourself on your computer rather than your host
you mean just running deploy myself locally whenever necessary, while still having the bot on the host?
yes
ah ok, i wasnt sure i could do that.