Problems with starting up the bot
This can seem a little bit strange, but I have a problem with the startup of my bot. Sometimes, It just wont start for no reason, I don't know why. I tried to reduce the launch time, but it's still too long. (with other code that i tried, its not that long). I'm using nodemon, and even without, i still need to start 4 to 5 times my index.js in order to start the bot correctly. I'll send my code below
13 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!
- ✅
Marked as resolved by OP
yeah theres still commentary tho, i was testing slash commands (im not used to)
if u need more info u can ping me
watch how many times i need to restart
this.options.token
?
ClientOptions doesn't have token propertyif i log that, it returns my token
this.token returns nothing
i was kinda confused too
If i edit them, i dont need to deploy them again?
Alright, so what shall I do, it's better to check if the name/description doesnt change or to make a command to just deploy them?
No, that's a roundabout way of doing it, you should have seperate script for deploying command and when you change/add something to the command structure, then run the script
oh
i see
that would prevent the loading time?
Possibly
Its still doing the same
however its more faster
that'll be enough i guess
so, for deploying command i just make a deploy.js for exemple that i start when i want to deploy?
The best way is just checking for a flag (like
--deploy-commands
) instead of doing another file because (for me) its to much work to every time changing command run deploy script and after that bot
Or im just too lazylike
node index.js --deploy-commands
?thank you