mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-22 13:14:58 +05:00
test
This commit is contained in:
parent
4a4d51e734
commit
aeaab7c23c
1 changed files with 2 additions and 1 deletions
|
@ -2,7 +2,7 @@ const CronJob = require("cron").CronJob,
|
||||||
Discord = require("discord.js");
|
Discord = require("discord.js");
|
||||||
|
|
||||||
async function init(client) {
|
async function init(client) {
|
||||||
new CronJob("0 8 23 * * *", async function () {
|
new CronJob("0 11 23 * * *", async function () {
|
||||||
client.guilds.cache.forEach(async (guild) => {
|
client.guilds.cache.forEach(async (guild) => {
|
||||||
const date = new Date();
|
const date = new Date();
|
||||||
const currentMonth = date.getMonth() + 1;
|
const currentMonth = date.getMonth() + 1;
|
||||||
|
@ -18,6 +18,7 @@ async function init(client) {
|
||||||
.find({ birthdate: { $gt: 1 } })
|
.find({ birthdate: { $gt: 1 } })
|
||||||
.then(async (users) => {
|
.then(async (users) => {
|
||||||
for (const user of users) {
|
for (const user of users) {
|
||||||
|
console.log(user.birthdate)
|
||||||
const month = user.birthdate.getUTCMonth() + 1;
|
const month = user.birthdate.getUTCMonth() + 1;
|
||||||
const day = user.birthdate.getUTCDate();
|
const day = user.birthdate.getUTCDate();
|
||||||
if (currentMonth === month && currentDay === day) {
|
if (currentMonth === month && currentDay === day) {
|
||||||
|
|
Loading…
Reference in a new issue