restart command

I know there is a client.destroy how can I make a restart command with it and do i need to do new Client mmLol
6 Replies
d.js toolkit
d.js toolkit11mo ago
- 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
d.js docs
d.js docs11mo ago
guide Improving Your Dev Environment: Managing your bot process with PM2 read more
Mark
Mark11mo ago
use pm2, then exit the process and pm2 will restart it for you
CC8
CC8OP11mo ago
I don't want to exit the process Just restart the bot in case of errors
Mark
Mark11mo ago
that's what pm2 will do
CC8
CC8OP11mo ago
I want to run client .detroy and then recreate the bot I want to have a command to log off my bot and optionally run login again. Basically turning my bot off and on I have an express route for that That's why i don't want to exit the process I've told you i want an option to start stop my bot easily with api routes. And command Oh now you have a good point. I'll try that thanks fingerguns
Want results from more Discord servers?
Add your server