dankgrinder 8.78.0 → 8.79.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/grinder.js +6 -3
- package/package.json +1 -1
package/lib/grinder.js
CHANGED
|
@@ -744,8 +744,10 @@ class AccountWorker {
|
|
|
744
744
|
const self = this;
|
|
745
745
|
function cleanup() {
|
|
746
746
|
clearTimeout(timer);
|
|
747
|
-
self.client
|
|
748
|
-
|
|
747
|
+
if (self.client) {
|
|
748
|
+
self.client.removeListener('messageCreate', handler);
|
|
749
|
+
self.client.removeListener('messageUpdate', updateHandler);
|
|
750
|
+
}
|
|
749
751
|
}
|
|
750
752
|
function handler(msg) {
|
|
751
753
|
if (msg.author.id === DANK_MEMER_ID && msg.channel.id === self.channel.id) {
|
|
@@ -3089,7 +3091,8 @@ async function start(apiKey, apiUrl, opts = {}) {
|
|
|
3089
3091
|
(CLUSTER_ENABLED ? ` | node: ${NODE_ID.substring(0, 12)}` : '');
|
|
3090
3092
|
sendWebhook('Session Ended', webhookMsg, 0x8b5cf6).catch(() => {});
|
|
3091
3093
|
|
|
3092
|
-
|
|
3094
|
+
const disResult = redis?.disconnect?.();
|
|
3095
|
+
if (disResult && typeof disResult.catch === 'function') disResult.catch(() => {});
|
|
3093
3096
|
console.log(`${c.green}Goodbye!${c.reset}\n`);
|
|
3094
3097
|
// Force exit so Ctrl+C always terminates immediately
|
|
3095
3098
|
setTimeout(() => process.exit(0), 2000);
|