Added Basic Fact of the Day Feature

This commit is contained in:
Ahmad 2025-03-08 00:29:19 -05:00
parent 2139f2efa0
commit 40942e2539
No known key found for this signature in database
GPG key ID: 8FD8A93530D182BF
9 changed files with 544 additions and 27 deletions

View file

@ -3,6 +3,7 @@ import { Client, Events } from 'discord.js';
import { setMembers } from '../db/db.js';
import { loadConfig } from '../util/configLoader.js';
import { Event } from '../types/EventTypes.js';
import { scheduleFactOfTheDay } from '../util/factManager.js';
export default {
name: Events.ClientReady,
@ -21,6 +22,8 @@ export default {
const members = await guild.members.fetch();
const nonBotMembers = members.filter((m) => !m.user.bot);
await setMembers(nonBotMembers);
await scheduleFactOfTheDay(client);
} catch (error) {
console.error('Failed to initialize members in database:', error);
}