@@ -239,12 +239,18 @@ def guilds(self) -> List["Guild"]:
239239 """The guilds the user is in."""
240240 return list (filter (None , (self ._client .cache .get_guild (guild_id ) for guild_id in self ._guild_ids )))
241241
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 :
243249 """
244250 Edit the client's user.
245251
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
248254
249255 ??? Hint "Example Usage:"
250256 ```python
@@ -258,6 +264,7 @@ async def edit(self, *, username: Absent[str] = MISSING, avatar: Absent[UPLOADAB
258264 Args:
259265 username: The username you want to use
260266 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`
261268
262269 Raises:
263270 TooManyChanges: If you change the profile too many times
@@ -270,6 +277,10 @@ async def edit(self, *, username: Absent[str] = MISSING, avatar: Absent[UPLOADAB
270277 payload ["avatar" ] = to_image_data (avatar )
271278 elif avatar is None :
272279 payload ["avatar" ] = None
280+ if banner :
281+ payload ["banner" ] = to_image_data (banner )
282+ elif banner is None :
283+ payload ["banner" ] = None
273284
274285 try :
275286 resp = await self ._client .http .modify_client_user (payload )
0 commit comments