fix scheduler exit suddenly (#368)

This commit is contained in:
hmcdat
2025-10-01 23:22:36 +07:00
committed by GitHub
parent 554227e200
commit 3e499be8a9

View File

@@ -1291,8 +1291,10 @@ async function main() {
}
// Start the bots
main().catch(error => {
log('main', 'MAIN-ERROR', `Error running bots: ${error}`, 'error')
// CommunityReporter disabled
process.exit(1)
})
if (require.main === module) {
main().catch(error => {
log('main', 'MAIN-ERROR', `Error running bots: ${error}`, 'error')
// CommunityReporter disabled
process.exit(1)
})
}