Skip to content

Commit

Permalink
fix: fix discord connecting
Browse files Browse the repository at this point in the history
  • Loading branch information
Snazzah committed Dec 14, 2024
1 parent da29aa4 commit 89f8a1a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down
5 changes: 5 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 89f8a1a

Please sign in to comment.