|
| 1 | +# Pyrogram - Telegram MTProto API Client Library for Python |
| 2 | +# Copyright (C) 2017-present Dan <https://github.com/delivrance> |
| 3 | +# |
| 4 | +# This file is part of Pyrogram. |
| 5 | +# |
| 6 | +# Pyrogram is free software: you can redistribute it and/or modify |
| 7 | +# it under the terms of the GNU Lesser General Public License as published |
| 8 | +# by the Free Software Foundation, either version 3 of the License, or |
| 9 | +# (at your option) any later version. |
| 10 | +# |
| 11 | +# Pyrogram is distributed in the hope that it will be useful, |
| 12 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | +# GNU Lesser General Public License for more details. |
| 15 | +# |
| 16 | +# You should have received a copy of the GNU Lesser General Public License |
| 17 | +# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>. |
| 18 | + |
| 19 | +import pyrogram |
| 20 | +from pyrogram import raw |
| 21 | +from pyrogram import types |
| 22 | + |
| 23 | + |
| 24 | +class GetDefaultEmojiStatuses: |
| 25 | + async def get_default_emoji_statuses( |
| 26 | + self: "pyrogram.Client", |
| 27 | + ) -> types.List["types.EmojiStatus"]: |
| 28 | + """Get the default emoji statuses. |
| 29 | +
|
| 30 | + Returns: |
| 31 | + List of :obj:`~pyrogram.types.EmojiStatus`: On success, a list of emoji statuses is returned. |
| 32 | +
|
| 33 | + Example: |
| 34 | + .. code-block:: python |
| 35 | +
|
| 36 | + default_emoji_statuses = await app.get_default_emoji_statuses() |
| 37 | + print(default_emoji_statuses) |
| 38 | + """ |
| 39 | + r = await self.invoke( |
| 40 | + raw.functions.account.GetDefaultEmojiStatuses(hash=0) |
| 41 | + ) |
| 42 | + |
| 43 | + return types.List([types.EmojiStatus._parse(self, i) for i in r.statuses]) |
0 commit comments