You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/releases/changes-in-this-fork.rst
+12-1Lines changed: 12 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,12 +32,23 @@ Changes in this Fork
32
32
=====================
33
33
34
34
+------------------------+
35
-
| Scheme layer used: 222|
35
+
| Scheme layer used: 223|
36
36
+------------------------+
37
37
38
+
39
+
- Added the field ``can_edit_tag`` to the class :obj:`~pyrogram.types.ChatPermissions`.
40
+
- Added the field ``tag`` to the class :obj:`~pyrogram.types.ChatMember`.
41
+
- Added the field ``can_manage_tags`` to the class :obj:`~pyrogram.types.ChatPrivileges`.
42
+
- Added the methods :meth:`~pyrogram.Client.set_chat_member_tag` and :meth:`~pyrogram.Client.process_chat_protected_content_disable_request`. Updated the method :meth:`~pyyrogram.Client.set_chat_protected_content` to return the appropriate service message, if available.
43
+
- Added the field ``sender_tag`` to the class :obj:`~pyrogram.types.Message`.
38
44
- Add ``location`` in :obj:`~pyrogram.types.Chat` and add missing parameters in :meth:`~pyrogram.Client.create_supergroup`.
39
45
- fix: :meth:`~pyrogram.Client.get_media_group` concurrent logic (contributed by @Alekzum).
40
46
- properly implement in_memory arg in client to support session string. (contributed by @anonymousx97 in `#222 <https://github.com/KurimuzonAkuma/kurigram/pull/222>`__).
47
+
- View `new and changed <https://telegramplayground.github.io/TG-APIs/TL/diff/tdlib.html?from=222&to=223>`__ `raw API methods <https://telegramplayground.github.io/TG-APIs/TL/diff/tdesktop.html?from=222&to=223>`__.
48
+
49
+
+------------------------+
50
+
| Scheme layer used: 222 |
51
+
+------------------------+
41
52
42
53
- Added the field ``first_profile_audio`` to the class :obj:`~pyrogram.types.Chat` and the methods :meth:`~pyrogram.Client.get_chat_audios`, :meth:`~pyrogram.Client.get_chat_audios_count`, :meth:`~pyrogram.Client.add_profile_audio`, :meth:`~pyrogram.Client.remove_profile_audio`, :meth:`~pyrogram.Client.set_profile_audio_position`.
43
54
- Removed the methods :meth:`~pyrogram.Client.get_received_gifts`, :meth:`~pyrogram.Client.sell_gift`, :meth:`~pyrogram.Client.send_gift`, :meth:`~pyrogram.Client.toggle_gift_is_saved` and the :obj:`~pyrogram.types.ReceivedGift`.
"""Set a tag or custom title for a regular member in a group or a supergroup.
96
+
97
+
.. include:: /_includes/usable-by/users-bots.rst
98
+
99
+
The client must be an administrator in the chat (for basic groups and supergroups only) for this to work and must have the ``can_manage_tags`` administrator right.
100
+
101
+
Parameters:
102
+
chat_id (``int`` | ``str``):
103
+
Unique identifier (int) or username (str) of the target chat.
104
+
105
+
user_id (``int`` | ``str``):
106
+
Unique identifier (int) or username (str) of the target user.
107
+
For a contact that exists in your Telegram address book you can use his phone number (str).
108
+
109
+
tag (``str``, *optional*):
110
+
The new tag of the member in the chat.
111
+
0-16 characters without emoji.
112
+
Pass None or "" (empty string) to remove the custom title.
Copy file name to clipboardExpand all lines: pyrogram/methods/chats/set_chat_protected_content.py
+69-5Lines changed: 69 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -19,19 +19,24 @@
19
19
fromtypingimportUnion
20
20
21
21
importpyrogram
22
-
frompyrogramimportraw
22
+
frompyrogramimportraw, types
23
23
24
24
25
25
classSetChatProtectedContent:
26
26
asyncdefset_chat_protected_content(
27
27
self: "pyrogram.Client",
28
28
chat_id: Union[int, str],
29
29
enabled: bool
30
-
) ->bool:
30
+
) ->Union["types.Message", bool]:
31
31
"""Set the chat protected content setting.
32
32
33
33
.. include:: /_includes/usable-by/users.rst
34
34
35
+
Changes the ability of users to save, forward, or copy chat content.
36
+
37
+
Requires owner privileges in basic groups, supergroups and channels.
38
+
Requires Telegram Premium to enable protected content in private chats. Not available in Saved Messages and private chats with bots or support accounts.
39
+
35
40
Parameters:
36
41
chat_id (``int`` | ``str``):
37
42
Unique identifier (int) or username (str) of the target chat.
The bot that actually sent the message on behalf of the business account. Available only for outgoing messages sent on behalf of the connected business account.
86
86
87
+
sender_tag (``str``, *optional*):
88
+
Tag of the sender of the message in the supergroup at the time the message was sent.
89
+
May be empty if none or unknown.
90
+
For messages sent by basic groups or supergroup administrators, the current custom title or tag must be used instead.
0 commit comments