@@ -312,3 +312,110 @@ def unarchive(self):
312312 """
313313
314314 return self ._client .unarchive_chats (self .id )
315+
316+ def set_title (self , title : str ) -> bool :
317+ """Bound method *set_title* of :obj:`Chat`.
318+
319+ Use as a shortcut for:
320+
321+ .. code-block:: python
322+
323+ client.set_chat_title(
324+ chat_id=chat_id,
325+ title=title
326+ )
327+
328+ Example:
329+ .. code-block:: python
330+
331+ chat.set_title("Lounge")
332+
333+ Note:
334+ In regular groups (non-supergroups), this method will only work if the "All Members Are Admins"
335+ setting is off.
336+
337+ Parameters:
338+ title (``str``):
339+ New chat title, 1-255 characters.
340+
341+ Returns:
342+ ``bool``: True on success.
343+
344+ Raises:
345+ RPCError: In case of Telegram RPC error.
346+ ValueError: In case a chat_id belongs to user.
347+ """
348+
349+ return self ._client .set_chat_title (
350+ chat_id = self .id ,
351+ title = title
352+ )
353+
354+ def set_description (self , description : str ) -> bool :
355+ """Bound method *set_description* of :obj:`Chat`.
356+
357+ Use as a shortcut for:
358+
359+ .. code-block:: python
360+
361+ client.set_chat_description(
362+ chat_id=chat_id,
363+ description=description
364+ )
365+
366+ Example:
367+ .. code-block:: python
368+
369+ chat.set_chat_description("Don't spam!")
370+
371+ Parameters:
372+ description (``str``):
373+ New chat description, 0-255 characters.
374+
375+ Returns:
376+ ``bool``: True on success.
377+
378+ Raises:
379+ RPCError: In case of Telegram RPC error.
380+ ValueError If a chat_id doesn't belong to a supergroup or a channel.
381+ """
382+
383+ return self ._client .set_chat_description (
384+ chat_id = self .id ,
385+ description = description
386+ )
387+
388+
389+ def set_photo (self , photo : str ) -> bool :
390+ """Bound method *set_photo* of :obj:`Chat`.
391+
392+ Use as a shortcut for:
393+
394+ .. code-block:: python
395+
396+ client.set_chat_photo(
397+ chat_id=chat_id,
398+ photo=photo
399+ )
400+
401+ Example:
402+ .. code-block:: python
403+
404+ chat.set_photo("photo.png")
405+
406+ Parameters:
407+ photo (``str``):
408+ New chat photo. You can pass a :obj:`Photo` id or a file path to upload a new photo.
409+
410+ Returns:
411+ ``bool``: True on success.
412+
413+ Raises:
414+ RPCError: In case of a Telegram RPC error.
415+ ValueError: if a chat_id belongs to user.
416+ """
417+
418+ return self ._client .set_chat_photo (
419+ chat_id = self .id ,
420+ photo = photo
421+ )
0 commit comments