Skip to content

Change user profile avatar and name? #276

Answered by JU5TDIE
SinanAkkoyun asked this question in Help
Discussion options

You must be logged in to vote
name = 'Example'
password = 'password'
with open('avatar.png', 'rb') as f:
    img = f.read()
await client.user.edit(username=name, avatar=img, password=password)

img has to be bytes and password is required to change the name. discord.py-self docs

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by dolfies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants