'(Discord api) Change nicknamewith python requests
I want to enable the script to change my Discord username, I was looking on the Internet but I did not find anything. I would also like the script to change the avatar, please help in advance, thank you in advance.
I want it to work like my status change script I will post here but I want it to change username \ avatar
class main:
def __init__(self, token, status):
self.token = token
self.status = status
string = self.status
print("[+] Succes Status Set " + string)
self.set_status(string)
def set_status(self, status):
requests.patch("https://discord.com/api/v9/users/@me/settings", headers={"authorization": self.token,"content-type": "application/json"}, data=json.dumps({"custom_status":{"text":status,"emoji_name":"👉"}}))
if __name__ == "__main__":
if requests.patch("https://discord.com/api/v9/users/@me", headers={"authorization": token,"content-type": "application/json"}).status_code == 400:
main(token, status)
else:
print("Failed to connect to token")
input()
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
