Change user profile avatar and name? #276
Answered
by
JU5TDIE
SinanAkkoyun
asked this question in
Help
-
Hey :D Thanks very much for the awesome lib! |
Beta Was this translation helpful? Give feedback.
Answered by
JU5TDIE
Apr 11, 2022
Replies: 1 comment
-
name = 'Example'
password = 'password'
with open('avatar.png', 'rb') as f:
img = f.read()
await client.user.edit(username=name, avatar=img, password=password)
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
dolfies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
img
has to be bytes andpassword
is required to change the name. discord.py-self docs