Skip to main content
The inventory scanner analyzes a user’s badge inventory and identifies potential spam badges by comparing them against known spam lists. This command does not delete badges - it only generates reports.

Basic Usage

--check-inventory
integer
required
User ID whose inventory you want to scanAliases: -c, USER_ID
dbr --check-inventory 123456789
This command does not require authentication (no --rbx-token needed) since it only reads public badge data.

Prerequisites

Before scanning, you must download spam detection lists:
dbr --download-mgs-invalid-list
dbr --download-badge-spam-lists
See Download Lists for more details on spam detection sources.

How It Works

1

Load Spam Lists

Compiles spam detection lists from:
  • mgs_invalid_games.json (MetaGamerScore)
  • badge-spam-lists-main/*.txt.zst (Community lists)
  • spam_badges.txt (optional custom list)
2

Convert to Frozensets

Optimizes lookup performance by converting lists to frozensets
3

Scan Badge Inventory

Fetches all badges from the user’s inventory (100 per page)
4

Match Against Lists

Compares each badge’s place ID and badge ID against spam lists
5

Generate Reports

Creates timestamped output files with found badges and places

Output Files

The scanner creates a timestamped folder with multiple output files:

Folder Structure

scanresults_{USER_ID}_{TIMESTAMP}/
├── scanresults_{USER_ID}_{TIMESTAMP}_BADGES.txt
├── scanresults_{USER_ID}_{TIMESTAMP}_GAMES.txt
├── results.log
├── spam_places_list.json
├── spam_badges_list.json
└── badge_inventory/
    ├── {USER_ID}_1.json
    ├── {USER_ID}_2.json
    └── ...

File Descriptions

List of Roblox badge URLs that matched spam lists:
https://www.roblox.com/badges/2124858409
https://www.roblox.com/badges/2124858410
https://www.roblox.com/badges/2124858411
Usage: Feed this directly to DBR for badge removal:
dbr --env-file .env --file scanresults_123456789_1234567890_BADGES.txt
List of Roblox game URLs containing spam badges:
https://www.roblox.com/games/1818
https://www.roblox.com/games/534706382
Usage: Remove all badges from these games:
dbr --env-file .env --file scanresults_123456789_1234567890_GAMES.txt
Detailed log with timestamps and source information:
12:34:56,789 INFO Badge: 2124858409 | Place: 1818 (from: mgs_invalid_games.json)
12:34:58,123 INFO Badge: 2124858410 | Place: 1818 (from: badge_chain_xyz.txt.zst)
Compiled dictionary of all spam place IDs organized by source:
{
  "mgs_invalid_games.json": [1818, 534706382],
  "badge_chain_abc.txt.zst": [1818, 9876543]
}
Compiled list of spam badge IDs (if spam_badges.txt exists):
{
  "spam_badges.txt": [2124858409, 2124858410]
}
Raw badge inventory data from Roblox API (one file per page):
{
  "data": [
    {
      "id": 2124858409,
      "name": "Badge Name",
      "awarder": {"id": 1818},
      "awardedDate": "2024-01-01T00:00:00Z"
    }
  ],
  "nextPageCursor": "abc123"
}
Useful for manual analysis or debugging.

Example Session

dbr --check-inventory 123456789

Detection Logic

Place ID Matching

For each badge, the scanner checks if its place ID (awarder ID) appears in any spam list:
place_id = badge_entry['awarder']['id']
if place_id in PLACE_SPAM:
    # Match found - save badge and place
If a place is found in spam lists, all badges from that place are flagged, even if earned from subsequent pages.

Badge ID Matching

The scanner also checks individual badge IDs against spam_badges.txt:
badge_id = badge_entry['id']
if badge_id in BADGE_SPAM:
    # Match found - save badge
This catches specific spam badges even if their place isn’t listed.

Optimization

Once a place is identified as spam:
  • All future badges from that place are automatically flagged
  • Place name lookups are skipped for performance
  • Badges are saved without making additional HEAD requests

Using Scan Results

Remove All Found Badges

Use the generated BADGES.txt file:
dbr --env-file .env --file scanresults_123456789_1234567890_BADGES.txt

Remove by Game (Safer)

Use the GAMES.txt file to remove badges place-by-place:
dbr --env-file .env --file scanresults_123456789_1234567890_GAMES.txt
Removing by game is safer because DBR will only delete badges you actually own from each place, rather than attempting to delete every badge ID found.

Selective Removal

Manually review and edit the output files before deletion:
  1. Open scanresults_*_BADGES.txt or scanresults_*_GAMES.txt
  2. Remove lines for badges/games you want to keep
  3. Save the file
  4. Run DBR with the edited file

Custom Spam Lists

Adding Custom Badge IDs

Create a spam_badges.txt file in the current directory:
spam_badges.txt
2124858409
2124858410
2124858411
The scanner automatically includes this file if it exists.

File Format

  • One badge ID per line
  • No URLs, just numeric IDs
  • Empty lines are ignored

Performance Considerations

Scan Speed

  • Processes 100 badges per page
  • API rate limits apply (automatic delays between pages)
  • Typical inventory: 2-5 seconds per page
  • Large inventories (10,000+ badges): 5-10 minutes

Memory Usage

The scanner uses frozensets for O(1) lookup performance:
  • Small inventories: < 50 MB RAM
  • Large inventories: 50-200 MB RAM
  • Badge spam lists: ~10-30 MB RAM
Frozensets provide constant-time lookups regardless of list size, making scans efficient even with large spam databases.

Troubleshooting

Cause: Missing spam detection listsSolution: Download required lists first:
dbr --download-mgs-invalid-list
dbr --download-badge-spam-lists
Cause: Missing zstandard package (required for .txt.zst files)Solution: Install the package:
pip install zstandard
Cause: Corrupted .txt.zst fileSolution: Re-download badge spam lists:
rm -rf badge-spam-lists-main/
dbr --download-badge-spam-lists
Cause: User has privacy settings enabledSolution: User must disable inventory privacy in Roblox settings. Only public inventories can be scanned.

Comparison with Direct Removal

Pros:
  • Preview what will be deleted
  • No authentication required
  • Generate reusable lists
  • Review before deletion
  • Safe for testing
Cons:
  • Two-step process (scan then delete)
  • Requires spam list downloads
  • Only detects known spam

Best Practices

Review Before Deleting

Always check the output files before feeding them to DBR for deletion

Keep Lists Updated

Periodically re-download spam lists to catch new badge chains

Backup Results

Save scan results for future reference or analysis

Start with GAMES.txt

Use the games file for safer, place-by-place removal
The scanner generates URLs with proper redirects when possible, but some badge/place URLs may redirect to error pages if the content has been deleted by Roblox.

Build docs developers (and LLMs) love