@@ -239,12 +239,18 @@ def guilds(self) -> List["Guild"]:
239
239
"""The guilds the user is in."""
240
240
return list (filter (None , (self ._client .cache .get_guild (guild_id ) for guild_id in self ._guild_ids )))
241
241
242
- async def edit (self , * , username : Absent [str ] = MISSING , avatar : Absent [UPLOADABLE_TYPE ] = MISSING ) -> None :
242
+ async def edit (
243
+ self ,
244
+ * ,
245
+ username : Absent [str ] = MISSING ,
246
+ avatar : Absent [UPLOADABLE_TYPE ] = MISSING ,
247
+ banner : Absent [UPLOADABLE_TYPE ] = MISSING ,
248
+ ) -> None :
243
249
"""
244
250
Edit the client's user.
245
251
246
- You can either change the username, or avatar, or both at once .
247
- `avatar` may be set to `None` to remove your bot's avatar
252
+ You can change the username, avatar, and banner, or any combination of the three .
253
+ `avatar` and `banner` may be set to `None` to remove your bot's avatar/banner
248
254
249
255
??? Hint "Example Usage:"
250
256
```python
@@ -258,6 +264,7 @@ async def edit(self, *, username: Absent[str] = MISSING, avatar: Absent[UPLOADAB
258
264
Args:
259
265
username: The username you want to use
260
266
avatar: The avatar to use. Can be a image file, path, or `bytes` (see example)
267
+ banner: The banner to use. Can be a image file, path, or `bytes`
261
268
262
269
Raises:
263
270
TooManyChanges: If you change the profile too many times
@@ -270,6 +277,10 @@ async def edit(self, *, username: Absent[str] = MISSING, avatar: Absent[UPLOADAB
270
277
payload ["avatar" ] = to_image_data (avatar )
271
278
elif avatar is None :
272
279
payload ["avatar" ] = None
280
+ if banner :
281
+ payload ["banner" ] = to_image_data (banner )
282
+ elif banner is None :
283
+ payload ["banner" ] = None
273
284
274
285
try :
275
286
resp = await self ._client .http .modify_client_user (payload )
0 commit comments