File tree Expand file tree Collapse file tree
pyrogram/client/methods/chats Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -184,6 +184,7 @@ def get_title_list(s: str) -> list:
184184 unban_chat_member
185185 restrict_chat_member
186186 promote_chat_member
187+ set_administrator_title
187188 export_chat_invite_link
188189 set_chat_photo
189190 delete_chat_photo
Original file line number Diff line number Diff line change 4040from .pin_chat_message import PinChatMessage
4141from .promote_chat_member import PromoteChatMember
4242from .restrict_chat_member import RestrictChatMember
43+ from .set_administrator_title import SetAdministratorTitle
4344from .set_chat_description import SetChatDescription
4445from .set_chat_permissions import SetChatPermissions
4546from .set_chat_photo import SetChatPhoto
4647from .set_chat_title import SetChatTitle
47- from .set_custom_title import SetCustomTitle
4848from .unarchive_chats import UnarchiveChats
4949from .unban_chat_member import UnbanChatMember
5050from .unpin_chat_message import UnpinChatMessage
@@ -84,6 +84,6 @@ class Chats(
8484 DeleteChannel ,
8585 DeleteSupergroup ,
8686 GetNearbyChats ,
87- SetCustomTitle
87+ SetAdministratorTitle
8888):
8989 pass
Original file line number Diff line number Diff line change 2222from ...ext import BaseClient
2323
2424
25- class SetCustomTitle (BaseClient ):
26- def set_custom_title (
25+ class SetAdministratorTitle (BaseClient ):
26+ def set_administrator_title (
2727 self ,
2828 chat_id : Union [int , str ],
2929 user_id : Union [int , str ],
3030 title : str ,
3131 ) -> bool :
32- """Set a custom title to administrators or owners of a supergroup.
32+ """Set a custom title (rank) to an administrator of a supergroup.
33+
34+ If you are an administrator of a supergroup (i.e. not the owner), you can only set the title of other
35+ administrators who have been promoted by you. If you are the owner, you can change every administrator's title.
3336
3437 Parameters:
3538 chat_id (``int`` | ``str``):
@@ -49,8 +52,7 @@ def set_custom_title(
4952 Example:
5053 .. code-block:: python
5154
52- # Set custom titles to owners or administrators of supergroups
53- app.set_custom_title(chat_id, user_id, "Custom Title")
55+ app.set_administrator_title(chat_id, user_id, "ฅ^•ﻌ•^ฅ")
5456 """
5557 chat_id = self .resolve_peer (chat_id )
5658 user_id = self .resolve_peer (user_id )
You can’t perform that action at this time.
0 commit comments