diff --git a/src/index.ts b/src/index.ts index cfa1bae..997b391 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2,6 +2,8 @@ import bot from '@bot'; import { ApplicationCommandRegistries, RegisterBehavior } from "@sapphire/framework"; import * as http from 'http'; +// require('dotenv').config(); + ApplicationCommandRegistries.setDefaultBehaviorWhenNotIdentical(RegisterBehavior.BulkOverwrite); const server = http.createServer((req, res) => { @@ -12,4 +14,11 @@ const server = http.createServer((req, res) => { server.listen(process.env.CLOUDRUN_PORT, () => { console.log('Hello world listening on port', process.env.CLOUDRUN_PORT); bot.login(process.env.TOKEN) + .then(() => { + console.log('Bot is ready'); + }) + .catch((error) => { + console.error('Error while logging in', error); + }); + console.log('Server running at http://localhost:' + process.env.CLOUDRUN_PORT + '/'); });