63 |
}; |
}; |
64 |
|
|
65 |
services = { |
services = { |
66 |
|
"@services/DebugLogger": "debugLogger", |
67 |
"@automod/Logger": "logger", |
"@automod/Logger": "logger", |
68 |
"@services/SnippetManager": "snippetManager", |
"@services/SnippetManager": "snippetManager", |
69 |
"@services/AFKEngine": "afkEngine", |
"@services/AFKEngine": "afkEngine", |
76 |
"@services/StartupManager": "startupManager", |
"@services/StartupManager": "startupManager", |
77 |
"@automod/AutoClear": "autoClear", |
"@automod/AutoClear": "autoClear", |
78 |
"@services/RandomStatus": "randomStatus", |
"@services/RandomStatus": "randomStatus", |
|
"@services/DebugLogger": "debugLogger", |
|
79 |
"@services/Verification": "verification", |
"@services/Verification": "verification", |
80 |
"@services/Welcomer": "welcomer", |
"@services/Welcomer": "welcomer", |
81 |
"@automod/Antijoin": "antijoin", |
"@automod/Antijoin": "antijoin", |
93 |
}, |
}, |
94 |
...options |
...options |
95 |
}); |
}); |
96 |
|
|
97 |
|
process.on('uncaughtException', (error, origin) => { |
98 |
|
console.log('Uncaught', error); |
99 |
|
this.handleCrash(error, origin).then(() => process.exit(-1)).catch(err => { |
100 |
|
console.log(err); |
101 |
|
process.exit(-1); |
102 |
|
}); |
103 |
|
}); |
104 |
|
|
105 |
console.log('init'); |
console.log('init'); |
106 |
|
|
151 |
setMessage(msg: Message | Interaction) { |
setMessage(msg: Message | Interaction) { |
152 |
this.msg = msg; |
this.msg = msg; |
153 |
} |
} |
154 |
|
|
155 |
|
async handleCrash(error: Error, origin: NodeJS.UncaughtExceptionOrigin) { |
156 |
|
await this.debugLogger.logToHomeServer(`Uncaught ${error.name}: ${error.message}\n${error.stack}`); |
157 |
|
} |
158 |
} |
} |