mitulagr2 / discord-uids

πŸš€ discord-uids is a quick and easy-to-use Discord Moderation tool to assist in handling Discord Server Raids.

Home Page:https://discord-uids.netlify.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

discord-uids

Discord User-ID extractor is a Quick and Easy-to-use tool to extract user IDs from a chunk of text, such as the GearBot join logs.

wesite-screenshot

Features

  • Clean and Minimal UI using Materialize.
  • Cut UIDs keybind for all them keyboard enthusiasts (I gotchu).
  • Time taken to extract UIDs metric (for all them performance enthusiasts, I gotchu-again).
  • Moderation bot command autocomplete (configurable).
  • Fully responsive across all screen sizes.

How it works

Problem

  1. Discord user-IDs can vary in length from ~17 to 19 characters long (Number of milliseconds elapsed since January 1, 2015 - source).
  2. Usernames may range in length from 2 to 32 characters (docs) and need not contain any alphabet. Usernames may contain round brackets.

This makes it hard to distinguish a potential bot username which imitates an UID from an actual UID.

Solution

Discord-UIDs relies on the fixed length of the user's tag and the hash preceding it, which being a special character is not allowed within usernames. This ensures no false-passes within the UID matching operation and ascertains that no user is wrongly banned. This method also provides for variable UID lengths of accounts created across all time periods.

Code

for (let i = 0; i < input.length; i++)

    // Example snipet from GearBot join logs -
    // [20:40:11] :gearJoin: cOqCXO#0286 (882686403140542546) has joined, account created 1 hour, 39 minutes ago. πŸ†•

    if (input[i] === '(' && input[i - 6] === '#') {

        let idLength = 1;
        
        while( input[++i] !== ')') {
          output += input[i];
          ++idLength;
        }
        
        output += "\n";
    }
}

Thank you very much!

Open to any suggestions on how to make this better! Feel free to fork the repo - Much appreciated!

About

πŸš€ discord-uids is a quick and easy-to-use Discord Moderation tool to assist in handling Discord Server Raids.

https://discord-uids.netlify.app/

License:MIT License


Languages

Language:HTML 71.1%Language:JavaScript 28.9%