Skip to content

Commit f16dabf

Browse files
committed
feat: integrate Advent of Code scheduler initialization in ready event with error handling
1 parent cbdad05 commit f16dabf

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/events/ready.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { Events } from 'discord.js';
22
import { config } from '../env.js';
3+
import { initializeAdventScheduler } from '../util/advent-scheduler.js';
34
import { fetchAndCachePublicChannelsMessages } from '../util/cache.js';
45
import { createEvent } from '../util/events.js';
56
import { syncGuidesToChannel } from '../util/post-guides.js';
@@ -44,5 +45,12 @@ export const readyEvent = createEvent(
4445
}
4546
}
4647
}
48+
49+
// Initialize Advent of Code scheduler
50+
try {
51+
initializeAdventScheduler(client, config.channelIds.adventOfCode);
52+
} catch (error) {
53+
console.error('❌ Failed to initialize Advent of Code scheduler:', error);
54+
}
4755
}
4856
);

0 commit comments

Comments
 (0)