npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

discord-alt-detector

v1.0.3

Published

A small library for discord.js to detect the suspiciousness of level of a user.

Downloads

43

Readme

discord version discord.js license stars

Discord Alt Detector

Discord Alt Detector is a small npm package to catch alt accounts based on a first glimpse. It will check for badges, username, pfp, status & more just to detect alt & scam accounts! If you're having trouble setting the bot up, feel free to join our support server and we will help you further!

⚠️ The system isn't perfect, so be aware that there could be false-positives between the results! ⚠️

Install it using npm!

npm i discord-alt-detector

⚠️ Privilleged Gateaway Intents ⚠️

This package requires the PRESENCE & GUILD_MEMBERS intents to be enabled in the developer portal! It's required for the package to read the profiles & status of the members!

📌 Features

  • 📊 75% detection success rate
  • 📦 lightweight
  • ✅ made with typescript
  • ⚙️ advanced configuration using weights
  • 📄 support for custom functions
  • 🖥️ discord.js v14
  • ⭐️ check more than just the age

Checked Properties

  • account age
  • pfp & banner
  • has nitro / serverbooster
  • profile badges
  • username & displayname
  • status & activity

🛠️ Usage

Dependencies

  • node.js v18 or higher
  • discord.js v14 or higher

Settings

In the settings, you can configure the weight of each detector.

  • If you want a checker to stand out from the rest, you can increase the weight (e.g. 2).
  • If you don't want something to affect the score, you can set the value to 0.
const detector = new AltDetector({
    ageWeight:1, //account age
    statusWeight:1, //user status (online, invisible, idle, dnd)
    activityWeight:1, //user activity (playing/listening ...)
    usernameWordsWeight:1, //suspicious words in username
    usernameSymbolsWeight:1, //special characters in username
    displaynameWordsWeight:1, //suspicious words in displayname
    
    displaynameCapsWeight:1, //caps characters in displayname
    //the more, the better => scammers & alts usually don't have many caps
    
    displaynameSymbolsWeight:1, //special characters in displayname
    flagsWeight:1, //profile badges (hypesquad, active dev, early supporter, ...)
    boosterWeight:1, //is server booster
    pfpWeight:1, //has non-default avatar
    bannerWeight:1, //has nitro banner
    customWeight:1 //weight for custom function
}

Result

The result is an object with the total score & categories object. In the categories, you can find the individual score per-category!

Weights are applied to all numbers in the result!

Category

When using the AltDetector.getCategory(result) function, you get one of the following categories:

|Category |Notes | |-------------------------|-------------------------------| |✅ "highly-trusted" |You can trust this person in all cases! (they could even apply for staff) | |✅ "trusted" |You can trust this person very good! | |✅ "normal" |A normal user, nothing to worry about! | |🟠 "newbie" |A new user on discord, you might inspect him/her a little more! | |🟠 "suspicious" |Be careful with this user, this might be an alt/spy account! | |❌ "highly-suspicious" |Be really careful with this user, it's almost certainly an alt/scammer! | |❌ "mega-suspicious" |This account meets all the requirements to be an alt/scam account! |

Example Code

const discord = require("discord.js")
const { AltDetector } = require("discord-alt-detector")
const client = new discord.Client({
    //these intents are required for the bot to work!
    intents:[
        discord.GatewayIntentBits.Guilds,
        discord.GatewayIntentBits.GuildMembers,
        discord.GatewayIntentBits.GuildMessages,
        discord.GatewayIntentBits.MessageContent,
        discord.GatewayIntentBits.GuildPresences
    ]
})

const detector = new AltDetector({
    //settings
    //change weights here
},(member,user) => {
    //custom function (for extra score)
    return 1
})

client.on("guildMemberAdd",(member) => {
    const result = altdetect.check(member)
    const category = altdetect.getCategory(result)
    console.log(member.user.displayName,result.total) //total score
    console.log(category) //the level of trust based in categories (trusted,normal,suspicious,...)
})

📸 Screenshots

Verification log message with trust level:

🩷 Sponsors

We don't have any sponsors yet! Would you like to do it?

🛠️ Contributors

Official Team

|Role |User (discord name)| |-----------------|-------------------| |Developer |djj123dj |

Community

We don't have any community contributors yet!

⭐️ Star History

Please help us grow by giving a star! It would help us a lot!

📎 Links

current version: v1.0.3 changelog: click here support: click here

© 2024 - DJdj Development | website | discord | terms of service