I have just started to try and shard my bot (I understand the number of guilds required for sharding) and Ive run into an issue. I used to have a clean exit that used
process.on("SIGINT", () => { /* some cleanup here */ })
However when I close the shard manager (subsequently closing all shards) this gets called but the shard manager force destroys the process before all the cleanup can be done.
Is there a way to allow the shard to complete a cleanExit (like closing DBs and destroying the client) before it force destroys the shard process??
question from:
https://stackoverflow.com/questions/65889959/perform-clean-exit-on-sharded-client-discord-js 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…