mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-23 23:34:28 +00:00
Update story method description
This commit is contained in:
parent
467e2a0764
commit
f7d0ec4e62
@ -21,7 +21,7 @@ from .auto_name import AutoName
|
|||||||
|
|
||||||
|
|
||||||
class StoriesPrivacyRules(AutoName):
|
class StoriesPrivacyRules(AutoName):
|
||||||
"""Stories privacy rules type enumeration used in :meth:`~pyrogram.method.SendStory`."""
|
"""Stories privacy rules type enumeration used in :meth:`~pyrogram.Client.send_story`."""
|
||||||
|
|
||||||
PUBLIC = auto()
|
PUBLIC = auto()
|
||||||
"Public stories"
|
"Public stories"
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
# You should have received a copy of the GNU Lesser General Public License
|
# You should have received a copy of the GNU Lesser General Public License
|
||||||
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
|
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import os
|
|
||||||
from typing import List, Union
|
from typing import List, Union
|
||||||
|
|
||||||
import pyrogram
|
import pyrogram
|
||||||
@ -47,13 +46,13 @@ class EditStoryPrivacy:
|
|||||||
privacy (:obj:`~pyrogram.enums.StoriesPrivacyRules`, *optional*):
|
privacy (:obj:`~pyrogram.enums.StoriesPrivacyRules`, *optional*):
|
||||||
Story privacy.
|
Story privacy.
|
||||||
|
|
||||||
allowed_users (List of ``int``, *optional*):
|
allowed_users (List of ``int`` | ``str``, *optional*):
|
||||||
List of user_id or chat_id of chat users who are allowed to view stories.
|
List of user_id or chat_id of chat users who are allowed to view stories.
|
||||||
Note: chat_id available only with :obj:`~pyrogram.enums.StoriesPrivacyRules.SELECTED_USERS`.
|
Note: chat_id available only with :obj:`~pyrogram.enums.StoriesPrivacyRules.SELECTED_USERS`.
|
||||||
Works with :obj:`~pyrogram.enums.StoriesPrivacyRules.CLOSE_FRIENDS`
|
Works with :obj:`~pyrogram.enums.StoriesPrivacyRules.CLOSE_FRIENDS`
|
||||||
and :obj:`~pyrogram.enums.StoriesPrivacyRules.SELECTED_USERS` only
|
and :obj:`~pyrogram.enums.StoriesPrivacyRules.SELECTED_USERS` only
|
||||||
|
|
||||||
disallowed_users (List of ``int``, *optional*):
|
disallowed_users (List of ``int`` | ``str``, *optional*):
|
||||||
List of user_id whos disallow to view the stories.
|
List of user_id whos disallow to view the stories.
|
||||||
Note: Works with :obj:`~pyrogram.enums.StoriesPrivacyRules.PUBLIC`
|
Note: Works with :obj:`~pyrogram.enums.StoriesPrivacyRules.PUBLIC`
|
||||||
and :obj:`~pyrogram.enums.StoriesPrivacyRules.CONTACTS` only
|
and :obj:`~pyrogram.enums.StoriesPrivacyRules.CONTACTS` only
|
||||||
@ -68,9 +67,12 @@ class EditStoryPrivacy:
|
|||||||
await app.edit_story_privacy(chat_id, story_id, enums.StoriesPrivacyRules.PUBLIC)
|
await app.edit_story_privacy(chat_id, story_id, enums.StoriesPrivacyRules.PUBLIC)
|
||||||
|
|
||||||
# Edit the privacy of the story to allow selected users to view the story
|
# Edit the privacy of the story to allow selected users to view the story
|
||||||
await app.edit_story_privacy(chat_id, story_id, enums.StoriesPrivacyRules.SELECTED_USERS,
|
await app.edit_story_privacy(
|
||||||
allowed_users=[123, 456])
|
chat_id,
|
||||||
|
story_id,
|
||||||
|
enums.StoriesPrivacyRules.SELECTED_USERS,
|
||||||
|
allowed_users=[123, 456]
|
||||||
|
)
|
||||||
"""
|
"""
|
||||||
privacy_rules = []
|
privacy_rules = []
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user