From 521b5cbfa2463a32a6dca419b9ac5cca9bd321c0 Mon Sep 17 00:00:00 2001 From: WubzyGD Date: Tue, 22 Jun 2021 22:06:59 -0600 Subject: [PATCH] user age logs --- events/guildMemberAdd.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/events/guildMemberAdd.js b/events/guildMemberAdd.js index 35611a2..9ca7dde 100644 --- a/events/guildMemberAdd.js +++ b/events/guildMemberAdd.js @@ -2,6 +2,9 @@ const GuildData = require('../models/guild'); const Responses = require('../models/responses'); const sendResponse = require('../util/response/sendresponse'); +const moment = require('moment'); +require('moment-precise-range-plugin'); + module.exports = async (client, member) => { let tg = await GuildData.findOne({gid: member.guild.id}); let tr = await Responses.findOne({gid: member.guild.id}); @@ -17,5 +20,13 @@ module.exports = async (client, member) => { try {member.guild.channels.cache.get(tg.wch).send(await sendResponse(member, member.guild.channels.cache.get(tg.wch), 'xdlol', client, tr.responses.get(tr.bindings.get('welcome'))));} catch {} } + member.guild.channels.cache.get('857097085915496468').send(new Discord.MessageEmbed() + .setTitle("Uptime") + .setDescription(moment.preciseDiff(moment(client.users.cache.get(member).createdAt), moment())) + .setColor('328ba8') + .setFooter("Luno") + .setTimestamp() + ); + client.user.setActivity(`over ${client.guilds.cache.get(client.misc.neptune).members.cache.size} members!`, {type: "WATCHING"}); }; \ No newline at end of file