Bot staying online when code isn’t running

In Discord.py, when I stop the code from running the bot account instantly goes offline. Why does it take a few minutes for Discord.js to do the same?
3 Replies
d.js toolkit
d.js toolkit2y ago
• 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.
Syjalo
Syjalo2y ago
You should destroy client manually
const signalListener = () => {
client.destroy();
process.exit()
}
process.on('SIGINT', signalListener);
process.on('SIGTERM', signalListener);
const signalListener = () => {
client.destroy();
process.exit()
}
process.on('SIGINT', signalListener);
process.on('SIGTERM', signalListener);
𝕯𝖔𝖉𝖔𝕾𝖊𝖆𝖑
Ok Thank you
Want results from more Discord servers?
Add your server