17 lines
651 B
Python
17 lines
651 B
Python
from dataclasses import dataclass
|
|
|
|
@dataclass
|
|
class TokenValidationResult:
|
|
success: bool
|
|
message: str = ""
|
|
|
|
def validate_discord_token(token: str, ignore_api_check=False) -> TokenValidationResult:
|
|
# Simple validation logic - real implementation would verify with Discord API
|
|
if len(token) < 50 or '.' not in token:
|
|
return TokenValidationResult(False, "Invalid token format")
|
|
|
|
if ignore_api_check:
|
|
return TokenValidationResult(True, "Token format valid (API check skipped)")
|
|
|
|
# In a real implementation, you would check with Discord API here
|
|
return TokenValidationResult(True, "Token appears valid")
|