-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathindex.js
More file actions
61 lines (47 loc) · 1.29 KB
/
index.js
File metadata and controls
61 lines (47 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
//TEst Scripts
/*
const { initBot, connectBot, syncDatabase } = require('./lib/test')
const { VERSION } = require('./config')
const { info, error, fatal } = require('./logger')
async function start() {
info(`Starting Xstro Bot v${VERSION}`)
try {
await initBot()
info('Initializing database...')
await syncDatabase()
info('Database synchronized successfully.')
await connectBot()
info('Bot connected successfully.')
} catch (err) {
error('Error during startup:', err)
info('Attempting to restart...')
setTimeout(start, 5000) // Restart after 5 seconds
}
}
start().catch(err => {
fatal('Unhandled error during startup:', err)
process.exit(1)
})
*/
/*const bot = require('/lib/client')
const { VERSION } = require('/config')
async function start() {
logger.info(`Starting xstro Bot v${VERSION}`)
try {
await bot.init()
logger.info('Initializing database...')
await bot.DATABASE.sync()
logger.info('Database synchronized successfully.')
await bot.connect()
logger.info('Bot connected successfully.')
} catch (error) {
logger.error('Error during startup:', error)
logger.info('Attempting to restart...')
setTimeout(start, 5000) // Restart after 5 seconds
}
}
start().catch(error => {
logger.fatal('Unhandled error during startup:', error)
process.exit(1)
})
*/