ping.js should work now
This commit is contained in:
parent
28db7dba47
commit
51786417c7
3 changed files with 5 additions and 5 deletions
3
main.js
3
main.js
|
@ -66,10 +66,11 @@ client.once('ready', async () => {
|
|||
debugChannel.send(turnOnMsg[help.RNG(turnOnMsg.length)]);
|
||||
}
|
||||
}
|
||||
await dbConnect();
|
||||
cron.schedule('0 13 * * *', async function() {
|
||||
ping();
|
||||
});
|
||||
await dbConnect();
|
||||
ping();
|
||||
console.log('Running!');
|
||||
});
|
||||
|
||||
|
|
|
@ -34,8 +34,7 @@ function gotMessage(message) {
|
|||
}
|
||||
|
||||
if (process.env.DEBUG == 'ON') {
|
||||
const debugger_ = require('./.debug.js');
|
||||
debugger_.debug(message);
|
||||
// smth
|
||||
}
|
||||
}
|
||||
|
||||
|
|
4
ping.js
4
ping.js
|
@ -1,7 +1,7 @@
|
|||
require('dotenv').config();
|
||||
const client = require('./main');
|
||||
const { bModel, eModel } = require('./database/schemas');
|
||||
const help = require('./helpFunctions');
|
||||
const { getGifEmbed } = require('./gifs');
|
||||
|
||||
module.exports = pingEvent;
|
||||
|
||||
|
@ -26,7 +26,7 @@ async function pingEvent() {
|
|||
const userId = todayBirthdays[j].id;
|
||||
if ((await guild.members.fetch()).find(user => user.id == userId) != undefined) {
|
||||
const gifAmount = 12;
|
||||
const embed = await help.getGifEmbed(`https://g.tenor.com/v1/search?q=anime-hug&key=${process.env.TENOR}&limit=${gifAmount}`, gifAmount);
|
||||
const embed = await getGifEmbed(`https://g.tenor.com/v1/search?q=anime-hug&key=${process.env.TENOR}&limit=${gifAmount}`, gifAmount);
|
||||
embed.setDescription(`Happy Birthday <@${userId}> !!!`);
|
||||
client.channels.cache.get(sysChannelIds[i])
|
||||
.send({ embeds: [embed] });
|
||||
|
|
Loading…
Reference in a new issue