通过Username#Discrim获取非共同服务器用户ID的可行性咨询
Hey there, let's clear this up straight away:
Short Answer
Nope, you can't directly retrieve a Discord user's User ID if all you have is their Username#Discrim tag and you don't share any servers with them or have them added as a friend.
Why This Happens
Discord's privacy setup is designed to keep users from being tracked or contacted by people they don't interact with. Without an existing connection—either being in the same server or having a friend link—the platform doesn't expose unique identifiers like User IDs to unconnected accounts. This goes for both the official Discord client and the public API; there's no built-in way to look up an ID using just a tag when you're not connected to the user.
Legitimate Workarounds
If you really need the ID for a valid reason, here are the only safe, rule-compliant options:
- Send a friend request: If the user has their privacy settings set to accept requests from anyone, once they accept, enable Discord's Developer Mode (found in User Settings > Advanced), then right-click their profile to copy their ID.
- Ask the user directly: This is the most straightforward and respectful approach—they can easily copy their own ID using Developer Mode too.
A Critical Warning
Stay away from third-party tools or bots that claim to look up IDs without a shared connection. These almost always break Discord's Terms of Service (specifically rules against unauthorized data scraping) and could get your account banned. A lot of these tools are also malicious, so they might steal your login info too.
内容的提问来源于stack exchange,提问作者kiyah

