antialt

A simple alt prevention check module for DiscordJS.

Usage no npm install needed!

<script type="module">
  import antialt from 'https://cdn.skypack.dev/antialt';
</script>

README

Discord anti-alt protection

This is an anti-alt package made for discord.js.

How to install ?

npm install antialt@latest 

or

npm i antialt@latest

Constructor

Base customization for the module.

| Entry        | Type | Definition | 
|----------------|---------------|---------------|
| #1   | STRING  | The time limit for an alt to be removed
| #2   | STRING  | kick or ban. DEFAULT: kick
| #3   | BOOLEAN  | Debug Mode Toggle

BASIC!!! Code example (For your main bot file (index.js/main.js or whatever yours is called) )

const Discord = require('discord.js');
const client = new Client({
    intents: 32767,
});
const altprev = require('antialt');
const police = new altprev('30d', 'kick', true); // If the account is 30 days or under, they will be kicked but you can customize the 30d to whatever you want in days, and you can change kick to ban or keep it as kick

client.on("ready", () => {
    // Your bot ready code 
});

client.on('guildMemberAdd', async guildMember => {
    await police.checkAlt(guildMember);
});

client.login('YOUR_BOT_TOKEN')

And with that you have an anti alt package