Update index.ts
This commit is contained in:
parent
bc9ccfa516
commit
9780e8c32c
1 changed files with 11 additions and 10 deletions
21
src/index.ts
21
src/index.ts
|
@ -22,43 +22,44 @@ const main = async () => {
|
||||||
await logger.silly("Database process started");
|
await logger.silly("Database process started");
|
||||||
})
|
})
|
||||||
.catch(async (err) => {
|
.catch(async (err) => {
|
||||||
logger.error(err);
|
await logger.error(err);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Start schedule manager
|
// Start schedule manager
|
||||||
await schedules(client)
|
await schedules(client)
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
logger.silly("Schedules process started");
|
await logger.silly("Schedules process started");
|
||||||
})
|
})
|
||||||
.catch(async (err) => {
|
.catch(async (err) => {
|
||||||
logger.error(err);
|
await logger.error(err);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Start command handler
|
// Start command handler
|
||||||
await commands(client)
|
await commands(client)
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
logger.silly("Commands process started");
|
await logger.silly("Commands process started");
|
||||||
})
|
})
|
||||||
.catch(async (err) => {
|
.catch(async (err) => {
|
||||||
logger.error(err);
|
await logger.error(err);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Start event handler
|
// Start event handler
|
||||||
await events(client)
|
await events(client)
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
logger.silly("Events process started");
|
await logger.silly("Events process started");
|
||||||
})
|
})
|
||||||
.catch(async (err) => {
|
.catch(async (err) => {
|
||||||
logger.error(err);
|
await logger.error(err);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Authorize with Discord's API
|
// Authorize with Discord's API
|
||||||
await client.login(token);
|
await client.login(token);
|
||||||
};
|
};
|
||||||
main()
|
|
||||||
|
await main()
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
logger.silly("Main process started");
|
await logger.silly("Main process started");
|
||||||
})
|
})
|
||||||
.catch(async (err) => {
|
.catch(async (err) => {
|
||||||
logger.error(err);
|
await logger.error(err);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue