Update main.js

This commit is contained in:
ZyLacx 2022-02-18 14:38:08 +01:00
parent 319b828d47
commit 4adcf47976

View file

@ -46,11 +46,14 @@ mongoose
require('dotenv').config(); require('dotenv').config();
const help = require('./helpFunctions.js'); const help = require('./helpFunctions.js');
const resp = require('./responses.js'); const resp = require('./responses.js');
const bModel = require('./database/birthdaySchema');
const eModel = require('./database/eventSchema');
client.once('ready', async () => { client.once('ready', async () => {
if (client.user.username != 'MOOver Debug') { if (client.user.username != 'MOOver Debug') {
client.channels.cache.get('780439236867653635').send('AAAAAAAAAA!'); client.channels.cache.get('780439236867653635').send('AAAAAAAAAA!');
} }
console.log(bModel.find({}).exec(), eModel.find({}).exec());
cron.schedule('0 13 * * *', async function() { cron.schedule('0 13 * * *', async function() {
pingEvent(); pingEvent();
}); });
@ -173,9 +176,6 @@ function move(message, channelId) {
} }
async function pingEvent() { async function pingEvent() {
const bModel = require('./database/birthdaySchema');
const eModel = require('./database/eventSchema');
const currentDay = new Date().getDate(); const currentDay = new Date().getDate();
const currentMonth = new Date().getMonth() + 1; const currentMonth = new Date().getMonth() + 1;