Update main.js
This commit is contained in:
parent
c902a2bd69
commit
8a2410b32d
1 changed files with 5 additions and 2 deletions
7
main.js
7
main.js
|
@ -215,9 +215,11 @@ async function pingEvent() {
|
||||||
|
|
||||||
for (let i = 0; i < guildIds.length; i++) {
|
for (let i = 0; i < guildIds.length; i++) {
|
||||||
const guildId = guildIds[i];
|
const guildId = guildIds[i];
|
||||||
|
console.log(guildIds);
|
||||||
const sysChannelId = sysChannelIds[i];
|
const sysChannelId = sysChannelIds[i];
|
||||||
query = eModel.find({ guild: guildId, day: currentDay, month: currentMonth });
|
query = eModel.find({ guild: guildId, day: currentDay, month: currentMonth });
|
||||||
const guildEvents = await query.exec();
|
const guildEvents = await query.exec();
|
||||||
|
console.log(guildEvents);
|
||||||
for (let j = 0; j < globalEventList.length; j++) {
|
for (let j = 0; j < globalEventList.length; j++) {
|
||||||
let specialMessage = '';
|
let specialMessage = '';
|
||||||
if (globalEventList[i].name == 'Valentine\'s Day') {
|
if (globalEventList[i].name == 'Valentine\'s Day') {
|
||||||
|
@ -227,8 +229,9 @@ async function pingEvent() {
|
||||||
.send(`It's **${globalEventList[i].name}** today!` + specialMessage);
|
.send(`It's **${globalEventList[i].name}** today!` + specialMessage);
|
||||||
}
|
}
|
||||||
for (let j = 0; j < guildEvents.length; j++) {
|
for (let j = 0; j < guildEvents.length; j++) {
|
||||||
client.channels.cache.get(sysChannelId)
|
console.log(guildEvents[i].name);
|
||||||
.send(`It's **${guildEvents[i].name}** today!`);
|
// client.channels.cache.get(sysChannelId)
|
||||||
|
// .send(`It's **${guildEvents[i].name}** today!`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue