From 89f8a1a0995772a1e1b1f8c457451262774bad1e Mon Sep 17 00:00:00 2001 From: Snazzah Date: Fri, 13 Dec 2024 21:44:20 -0600 Subject: [PATCH] fix: fix discord connecting --- src/client.ts | 2 +- src/index.ts | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/client.ts b/src/client.ts index 3688803..bac8832 100644 --- a/src/client.ts +++ b/src/client.ts @@ -4,7 +4,7 @@ import { onChannelCreate, onChannelDelete, onChannelUpdate, onEntitlementCreate, import { logger } from './logger'; import { start as startPoster } from './poster'; -export const client = new Eris.Client(process.env.DISCORD_BOT_TOKEN, { +export const client = new Eris.Client(`Bot ${process.env.DISCORD_BOT_TOKEN}`, { gateway: { maxShards: 'auto', intents: ['guilds', 'guildWebhooks'] diff --git a/src/index.ts b/src/index.ts index 363e79d..187cc3d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -46,10 +46,15 @@ process.once('SIGINT', async () => { }); export async function start() { + logger.info('Starting...'); if (process.env.INFLUX_URL) influxCron.start(); + logger.info('Connecting to Redis...'); await redisClient.connect(); + logger.info('Connecting to db...'); await prisma.$connect(); + logger.info('Connecting to Discord...'); await client.connect(); + logger.info('Ready!'); } export async function disconnect() {