Socket
Socket
Sign inDemoInstall

discord-antialts

Package Overview
Dependencies
32
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    discord-antialts

Easy to use discord.js anti alt package for your bot! Uses discord.js v13.


Version published
Weekly downloads
5
decreased by-64.29%
Maintainers
1
Install size
16.2 MB
Created
Weekly downloads
 

Readme

Source

Discord Anti Alts

Easy to use discord.js anti alts package for your bot! Uses discord.js v13.

Getting Started

  • Discord Anti Alts
  • Got some errors/bugs?

Installation

npm install discord-antialts

Usage

const { AntiAltClient } = require("discord-antialts");
const Discord = require("discord.js");
const client = new Discord.Client({
  intents: 32767,
});

client.on("ready", () => {
  console.log(`Logged in as ${client.user.tag}!`);
});

const c = new AntiAltClient({
  debug: false,
  altDays: 7, // optional,default 7
});

client.on("guildMemberAdd", (member) => {
  c.init(member, {
    action: "kick", // optional default kick
    whitelistUsers: ["role1", "role2"], // optional default none
  });
});
/**
 * @param {Discord.GuildMember} member - Guild member
 * @param {Object} date - Object of user createdAt, joinedAt, and how many days old the user is
 * @param {String} action - Action to take
 */
c.on("altAction", (member, date, action) => {
  const embed = new MessageEmbed()
    .setTitle("Alt Found!")
    .setColor("RANDOM")
    .setFooter("Discord AntiAlts")
    .setTimestamp().setDescription(`
**__Alt Name__**: ${member.user} (${member.user.username})
**__ID__**: ${member.user.id}
**__Account Created__**: ${date.createdAt} days ago
**__Account Creation Date__**: ${date.createdAtDate}
**__Join Position__**: ${member.guild.memberCount}
**__Join Date__**: ${date.joinAt}
`);
  client.channels.cache.get("your id").send({ embeds: [embeds] });
});

client.login("your super secret token");

Got some errors/bugs?

Join here for help.

Keywords

FAQs

Last updated on 24 Nov 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc