mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-28 00:56:19 +00:00
Add get_default_emoji_statuses method
This commit is contained in:
parent
f7319858e1
commit
04b343f61b
@ -251,6 +251,7 @@ def pyrogram_api():
|
|||||||
block_user
|
block_user
|
||||||
unblock_user
|
unblock_user
|
||||||
get_common_chats
|
get_common_chats
|
||||||
|
get_default_emoji_statuses
|
||||||
""",
|
""",
|
||||||
invite_links="""
|
invite_links="""
|
||||||
Invite Links
|
Invite Links
|
||||||
|
@ -21,6 +21,7 @@ from .delete_profile_photos import DeleteProfilePhotos
|
|||||||
from .get_chat_photos import GetChatPhotos
|
from .get_chat_photos import GetChatPhotos
|
||||||
from .get_chat_photos_count import GetChatPhotosCount
|
from .get_chat_photos_count import GetChatPhotosCount
|
||||||
from .get_common_chats import GetCommonChats
|
from .get_common_chats import GetCommonChats
|
||||||
|
from .get_default_emoji_statuses import GetDefaultEmojiStatuses
|
||||||
from .get_me import GetMe
|
from .get_me import GetMe
|
||||||
from .get_users import GetUsers
|
from .get_users import GetUsers
|
||||||
from .set_profile_photo import SetProfilePhoto
|
from .set_profile_photo import SetProfilePhoto
|
||||||
@ -41,5 +42,6 @@ class Users(
|
|||||||
GetChatPhotosCount,
|
GetChatPhotosCount,
|
||||||
UnblockUser,
|
UnblockUser,
|
||||||
UpdateProfile,
|
UpdateProfile,
|
||||||
|
GetDefaultEmojiStatuses
|
||||||
):
|
):
|
||||||
pass
|
pass
|
||||||
|
43
pyrogram/methods/users/get_default_emoji_statuses.py
Normal file
43
pyrogram/methods/users/get_default_emoji_statuses.py
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
# Pyrogram - Telegram MTProto API Client Library for Python
|
||||||
|
# Copyright (C) 2017-present Dan <https://github.com/delivrance>
|
||||||
|
#
|
||||||
|
# This file is part of Pyrogram.
|
||||||
|
#
|
||||||
|
# Pyrogram is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU Lesser General Public License as published
|
||||||
|
# by the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# Pyrogram is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU Lesser General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU Lesser General Public License
|
||||||
|
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
import pyrogram
|
||||||
|
from pyrogram import raw
|
||||||
|
from pyrogram import types
|
||||||
|
|
||||||
|
|
||||||
|
class GetDefaultEmojiStatuses:
|
||||||
|
async def get_default_emoji_statuses(
|
||||||
|
self: "pyrogram.Client",
|
||||||
|
) -> types.List["types.EmojiStatus"]:
|
||||||
|
"""Get the default emoji statuses.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
List of :obj:`~pyrogram.types.EmojiStatus`: On success, a list of emoji statuses is returned.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
.. code-block:: python
|
||||||
|
|
||||||
|
default_emoji_statuses = await app.get_default_emoji_statuses()
|
||||||
|
print(default_emoji_statuses)
|
||||||
|
"""
|
||||||
|
r = await self.invoke(
|
||||||
|
raw.functions.account.GetDefaultEmojiStatuses(hash=0)
|
||||||
|
)
|
||||||
|
|
||||||
|
return types.List([types.EmojiStatus._parse(self, i) for i in r.statuses])
|
Loading…
Reference in New Issue
Block a user