File tree Expand file tree Collapse file tree 5 files changed +18
-17
lines changed
Expand file tree Collapse file tree 5 files changed +18
-17
lines changed Original file line number Diff line number Diff line change @@ -212,7 +212,7 @@ def get_title_list(s: str) -> list:
212212 get_dialogs
213213 iter_dialogs
214214 get_dialogs_count
215- update_chat_username
215+ set_chat_username
216216 get_nearby_chats
217217 archive_chats
218218 unarchive_chats
@@ -240,7 +240,7 @@ def get_title_list(s: str) -> list:
240240 iter_profile_photos
241241 set_profile_photo
242242 delete_profile_photos
243- update_username
243+ set_username
244244 update_profile
245245 block_user
246246 unblock_user
Original file line number Diff line number Diff line change 5050from .set_chat_photo import SetChatPhoto
5151from .set_chat_protected_content import SetChatProtectedContent
5252from .set_chat_title import SetChatTitle
53+ from .set_chat_username import SetChatUsername
5354from .set_send_as_chat import SetSendAsChat
5455from .set_slow_mode import SetSlowMode
5556from .unarchive_chats import UnarchiveChats
5657from .unban_chat_member import UnbanChatMember
5758from .unpin_all_chat_messages import UnpinAllChatMessages
5859from .unpin_chat_message import UnpinChatMessage
59- from .update_chat_username import UpdateChatUsername
6060
6161
6262class Chats (
@@ -79,7 +79,7 @@ class Chats(
7979 GetChatMembersCount ,
8080 IterDialogs ,
8181 IterChatMembers ,
82- UpdateChatUsername ,
82+ SetChatUsername ,
8383 SetChatPermissions ,
8484 GetDialogsCount ,
8585 ArchiveChats ,
Original file line number Diff line number Diff line change 2222from pyrogram .scaffold import Scaffold
2323
2424
25- class UpdateChatUsername (Scaffold ):
26- async def update_chat_username (
25+ class SetChatUsername (Scaffold ):
26+ async def set_chat_username (
2727 self ,
2828 chat_id : Union [int , str ],
2929 username : Optional [str ]
3030 ) -> bool :
31- """Update a channel or a supergroup username.
31+ """Set a channel or a supergroup username.
3232
33- To update your own username (for users only, not bots) you can use :meth:`~pyrogram.Client.update_username `.
33+ To set your own username (for users only, not bots) you can use :meth:`~pyrogram.Client.set_username `.
3434
3535 Parameters:
3636 chat_id (``int`` | ``str``)
3737 Unique identifier (int) or username (str) of the target chat.
38+
3839 username (``str`` | ``None``):
3940 Username to set. Pass "" (empty string) or None to remove the username.
4041
@@ -47,7 +48,7 @@ async def update_chat_username(
4748 Example:
4849 .. code-block:: python
4950
50- app.update_chat_username (chat_id, "new_username")
51+ app.set_chat_username (chat_id, "new_username")
5152 """
5253
5354 peer = await self .resolve_peer (chat_id )
Original file line number Diff line number Diff line change 2525from .get_users import GetUsers
2626from .iter_profile_photos import IterProfilePhotos
2727from .set_profile_photo import SetProfilePhoto
28+ from .set_username import SetUsername
2829from .unblock_user import UnblockUser
2930from .update_profile import UpdateProfile
30- from .update_username import UpdateUsername
3131
3232
3333class Users (
@@ -38,7 +38,7 @@ class Users(
3838 DeleteProfilePhotos ,
3939 GetUsers ,
4040 GetMe ,
41- UpdateUsername ,
41+ SetUsername ,
4242 GetProfilePhotosCount ,
4343 IterProfilePhotos ,
4444 UnblockUser ,
Original file line number Diff line number Diff line change 2222from pyrogram .scaffold import Scaffold
2323
2424
25- class UpdateUsername (Scaffold ):
26- async def update_username (
25+ class SetUsername (Scaffold ):
26+ async def set_username (
2727 self ,
2828 username : Optional [str ]
2929 ) -> bool :
30- """Update your own username.
30+ """Set your own username.
3131
3232 This method only works for users, not bots. Bot usernames must be changed via Bot Support or by recreating
33- them from scratch using BotFather. To update a channel or supergroup username you can use
34- :meth:`~pyrogram.Client.update_chat_username `.
33+ them from scratch using BotFather. To set a channel or supergroup username you can use
34+ :meth:`~pyrogram.Client.set_chat_username `.
3535
3636 Parameters:
3737 username (``str`` | ``None``):
@@ -43,7 +43,7 @@ async def update_username(
4343 Example:
4444 .. code-block:: python
4545
46- app.update_username ("new_username")
46+ app.set_username ("new_username")
4747 """
4848
4949 return bool (
You can’t perform that action at this time.
0 commit comments