mirror of
https://github.com/ahmadk953/poixpixel-discord-bot.git
synced 2025-05-10 18:53:05 +00:00
Added Basic Fact of the Day Feature
This commit is contained in:
parent
2139f2efa0
commit
40942e2539
9 changed files with 544 additions and 27 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue