dolfies / discord.py-self

A fork of the popular discord.py for user accounts.
https://discordpy-self.rtfd.io/en/latest/
MIT License
651 stars 154 forks source link

authless pomelo name checking #562

Open TheKidThatCodes opened 10 months ago

TheKidThatCodes commented 10 months ago

Summary

allow for authless pomelo name checking

What is the feature request for?

The core library

The Problem

the check_pomelo_username function uses auth which made me have to implement an authless version myself, would be nice if there was a function in the library to do that for me.

The Ideal Solution

something like my solution, but with error checking? my code checks for 429s and if it says anything other than {taken:True/False} but because its unauthed, you should probably check if it is a valid name before sending the http request

The Current Solution

with httpx.Client() as cl:
    req = cl.post("https://discord.com/api/v9/unique-username/username-attempt-unauthed",json={"username": username}, headers={"Content-Type": "application/json"})

this method is the same method used on the create account page

Additional Context

srry im bad at following gh issue templates