This commit is contained in:
Christopher Cookman 2024-04-15 00:28:24 -06:00
parent 7e4e7f97b5
commit 6bc181f87d
Signed by: ChrisChrome
GPG key ID: A023A26E42C33A42

View file

@ -385,6 +385,7 @@ client.on('guildMemberAdd', async (member) => { // We're just gonna always send
const channel = client.channels.cache.get(config.discord.invitelog)
let guild = member.guild
member.guild.invites.fetch().then(guildInvites => { //get all guild invites
await (async () => {
guildInvites.forEach(invite => { //basically a for loop over the invites
if (invite.uses != client.invites[invite.code]) { //if it doesn't match what we stored:
@ -410,6 +411,9 @@ client.on('guildMemberAdd', async (member) => { // We're just gonna always send
});
return client.invites[invite.code] = invite.uses
}
})
})();
channel.send({
embeds: [{
color: 0x00ff00,
@ -431,7 +435,6 @@ client.on('guildMemberAdd', async (member) => { // We're just gonna always send
}]
});
})
})
if (defcon <= 3) {
// DM user saying Invites are disabled for security reasons, then kick them with the same reason