New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ultrax

Package Overview
Dependencies
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ultrax - npm Package Compare versions

Comparing version 1.1.4 to 1.1.5

30

functions/invite-logger.js

@@ -18,17 +18,19 @@ const invites = {};

client.on('guildMemberAdd', member => {
// To compare, we need to load the current invite list.
member.guild.fetchInvites().then(guildInvites => {
// This is the *existing* invites for the guild.
const ei = invites[member.guild.id];
// Update the cached invites for the guild.
invites[member.guild.id] = guildInvites;
if (!ei) return;
// Look through the invites, find the one for which the uses went up.
const invite = guildInvites.find(i => ei.get(i.code).uses < i.uses);
// This is just to simplify the message being sent below (inviter doesn't have a tag property)
const inviter = client.users.cache.get(invite.inviter.id);
// Get the log channel (change to your liking)
client.emit("inviteJoin", member, invite, inviter)
});
try {
// To compare, we need to load the current invite list.
member.guild.fetchInvites().then(guildInvites => {
// This is the *existing* invites for the guild.
const ei = invites[member.guild.id];
// Update the cached invites for the guild.
invites[member.guild.id] = guildInvites;
if (!ei) return;
// Look through the invites, find the one for which the uses went up.
const invite = guildInvites.find(i => ei.get(i.code).uses < i.uses);
// This is just to simplify the message being sent below (inviter doesn't have a tag property)
const inviter = client.users.cache.get(invite.inviter.id);
// Get the log channel (change to your liking)
client.emit("inviteJoin", member, invite, inviter)
});
} catch (e) {}
});
};

@@ -6,3 +6,3 @@ const sleep = require('./functions/sleep'),

_checkUpdate = require("./functions/checkUpdates"),
ButtonPaginatoir = require("./functions/button-embed-reactor")
ButtonPaginator = require("./functions/button-embed-reactor")

@@ -17,3 +17,3 @@

inviteLogger,
ButtonPaginatoir
ButtonPaginator
};
{
"name": "ultrax",
"version": "1.1.4",
"version": "1.1.5",
"description": "This package is used to make stuff easier by using simple functions, its not fully released yet!",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc