diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 000000000..3e166cba3 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,483 @@ +# Hydrogram AGENTS.md + +## Project Overview + +Hydrogram is a Python MTProto client library for the Telegram API. It's an async-first framework supporting Python 3.9+ (CPython and PyPy), forked from Pyrogram with continued development. + +**Key Characteristics:** +- **License**: LGPL-3.0 +- **Python**: 3.9+ (supports CPython and PyPy) +- **Architecture**: Async/await-based with optional uvloop support +- **Crypto**: Uses pyaes (pure Python) or TgCrypto (C extension for performance) + +--- + +## Project Structure + +``` +hydrogram/ +├── client.py # Main Client class (extends Methods) +├── methods/ # API method implementations +│ ├── __init__.py # Methods class (mixin of all method categories) +│ ├── auth/ # Authentication methods +│ ├── messages/ # Message operations +│ ├── chats/ # Chat/channel operations +│ ├── users/ # User operations +│ ├── bots/ # Bot-specific methods +│ ├── advanced/ # Advanced MTProto methods +│ ├── utilities/ # Utility methods (idle, compose, handlers) +│ └── pyromod/ # pyromod extensions (get_listener, etc.) +├── types/ # Telegram API type definitions +│ ├── object.py # Base Object class +│ ├── user_and_chats/ # User, Chat, etc. +│ ├── messages_and_media/ # Message, Photo, etc. +│ ├── input_media/ # Input media types +│ └── input_message_content/ # Input content types +├── filters.py # Message/update filters +├── handlers/ # Handler classes +├── dispatcher.py # Update dispatching +├── session/ # MTProto session management +│ ├── session.py +│ └── internals/ +├── connection/ # Network connection layer +│ ├── connection.py +│ └── transport/tcp/ # TCP transports (abridged, intermediate, full) +├── storage/ # Session storage backends +│ ├── base.py # Abstract base +│ └── sqlite_storage.py +├── crypto/ # Cryptographic operations +├── raw/ # Raw MTProto layer (auto-generated) +├── enums/ # Enumeration definitions +├── errors/ # Exception classes +├── parser/ # HTML/Markdown parsers +└── helpers/ # Utility helpers +``` + +--- + +## Code Style & Standards + +### Linting & Formatting +- **Ruff** is used for both linting and formatting (line length: 99) +- Pre-commit hooks enforce style +- Run `ruff check .` before committing + +### Key Ruff Rules (ruff.toml) +- `FURB` - refurb suggestions +- `I` - isort import sorting +- `E`, `W` - pycodestyle +- `UP` - pyupgrade +- `SIM` - simplification +- `PERF` - performance lints +- `N` - PEP8 naming +- `FA` - future annotations +- Type-checking imports in `TYPE_CHECKING` blocks + +### Code Patterns + +**1. License Header** +All new Python files must include the following LGPL header: + +```python +# Hydrogram - Telegram MTProto API Client Library for Python +# Copyright (C) 2023-present Hydrogram +# +# This file is part of Hydrogram. +# +# Hydrogram 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. +# +# Hydrogram 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 Hydrogram. If not, see . +``` + +**Note**: Existing files retain both copyright holders (Dan + Hydrogram). New files should ONLY have the Hydrogram copyright line. + +**2. Future Annotations** +Always use `from __future__ import annotations` for forward references. + +**3. Type Hinting** +- Full type hints on all public APIs +- Use `TYPE_CHECKING` blocks for circular imports +- Prefer `str | None` over `Optional[str]` (Python 3.10+ style) + +--- + +## Architecture Patterns + +### 1. Client Class Hierarchy +```python +# methods/__init__.py +class Methods( + Advanced, Auth, Bots, Contacts, Password, Chats, + Users, Messages, Pyromod, Decorators, Utilities, InviteLinks, Phone +): + pass + +# client.py +class Client(Methods): + """Main client class, inherits all methods""" +``` + +### 2. Object Model (types/object.py) +All Telegram types inherit from `Object`: +```python +class Object: + def __init__(self, client: "hydrogram.Client" = None): + self._client = client + + def bind(self, client: "hydrogram.Client"): + """Bind client to this and nested objects""" + + def __str__(self) -> str: # JSON serialization + def __repr__(self) -> str: # Python repr + def __eq__(self, other) -> bool: # Deep equality +``` + +### 3. Method Implementation Pattern +```python +from __future__ import annotations + +from typing import TYPE_CHECKING + +import hydrogram +from hydrogram import enums, raw, types, utils + +if TYPE_CHECKING: + from datetime import datetime + + +class SendMessage: # Class name in PascalCase matching method name + async def send_message( + self: hydrogram.Client, + chat_id: int | str, + text: str, + *, # Force keyword-only arguments after required params + message_thread_id: int | None = None, + parse_mode: enums.ParseMode | None = None, + entities: list[types.MessageEntity] | None = None, + disable_web_page_preview: bool | None = None, + disable_notification: bool | None = None, + reply_to_message_id: int | None = None, + schedule_date: datetime | None = None, + protect_content: bool | None = None, + reply_markup: types.InlineKeyboardMarkup + | types.ReplyKeyboardMarkup + | types.ReplyKeyboardRemove + | types.ForceReply = None, + ) -> types.Message: + """Send text messages. + + .. include:: /_includes/usable-by/users-bots.rst + + Parameters: + chat_id (``int`` | ``str``): + Unique identifier (int) or username (str) of the target chat. + For your personal cloud (Saved Messages) you can simply use "me" or "self". + For a contact that exists in your Telegram address book you can use his phone number (str). + + text (``str``): + Text of the message to be sent. + + message_thread_id (``int``, *optional*): + Unique identifier for the target message thread (topic) of the forum. + for forum supergroups only. + + parse_mode (:obj:`~hydrogram.enums.ParseMode`, *optional*): + By default, texts are parsed using both Markdown and HTML styles. + You can combine both syntaxes together. + + entities (List of :obj:`~hydrogram.types.MessageEntity`): + List of special entities that appear in message text, which can be specified instead of *parse_mode*. + + disable_web_page_preview (``bool``, *optional*): + Disables link previews for links in this message. + + disable_notification (``bool``, *optional*): + Sends the message silently. + Users will receive a notification with no sound. + + Returns: + :obj:`~hydrogram.types.Message`: On success, the sent message is returned. + + Example: + .. code-block:: python + + # Simple send + await app.send_message(chat_id, "Hello") + + # With formatting + await app.send_message(chat_id, "**Bold** text", parse_mode=enums.ParseMode.MARKDOWN) + """ + # Method implementation... +``` + +**CRITICAL**: After creating the method file, you MUST add it to the category mixin class: + +```python +# File: hydrogram/methods/messages/__init__.py +from .send_message import SendMessage # Import the new method class +# ... other imports ... + +class Messages( + # ... other method classes ... + SendMessage, # Add the class here (inherits the method) +): + pass +``` + +The mixin class inherits from all individual method classes, making their methods available on the Client via multiple inheritance. + +### 4. Filter System (filters.py) +Filters are callable classes: +```python +class Filter: + async def __call__(self, client: hydrogram.Client, update: Update) -> bool: + raise NotImplementedError + + # Support logical operators + def __invert__(self) -> InvertFilter + def __and__(self, other: Filter) -> AndFilter + def __or__(self, other: Filter) -> OrFilter +``` + +Built-in filters: `filters.command`, `filters.private`, `filters.chat`, etc. + +### 5. Handler Pattern (handlers/) +Handlers wrap callback functions: +```python +from __future__ import annotations + +import inspect +from typing import TYPE_CHECKING, Callable + +if TYPE_CHECKING: + import hydrogram + from hydrogram.filters import Filter + from hydrogram.types import Update + + +class Handler: + def __init__(self, callback: Callable, filters: Filter | None = None): + self.callback = callback + self.filters = filters + + async def check(self, client: hydrogram.Client, update: Update): + if callable(self.filters): + if inspect.iscoroutinefunction(self.filters.__call__): + return await self.filters(client, update) + return await client.loop.run_in_executor(client.executor, self.filters, client, update) + + return True +``` + +Specialized handlers inherit from Handler: +- `MessageHandler` +- `CallbackQueryHandler` +- `InlineQueryHandler` +- etc. + +### 6. Storage Pattern (storage/) +Storage backends implement `BaseStorage`: +```python +from __future__ import annotations + +from abc import ABC, abstractmethod +from typing import Union + +from hydrogram import raw + +InputPeer = Union[raw.types.InputPeerUser, raw.types.InputPeerChat, raw.types.InputPeerChannel] + + +class BaseStorage(ABC): + """Abstract base class for storage engines.""" + + SESSION_STRING_FORMAT: str = ">BI?256sQ?" + + def __init__(self, name: str) -> None: + self.name = name + + @abstractmethod + async def open(self) -> None: ... + + @abstractmethod + async def save(self) -> None: ... + + @abstractmethod + async def close(self) -> None: ... + + @abstractmethod + async def dc_id(self, value: int | None = None) -> int: ... + + @abstractmethod + async def api_id(self, value: int | None = None) -> int: ... + + @abstractmethod + async def auth_key(self, value: bytes | None = None) -> bytes: ... + + @abstractmethod + async def update_peers(self, peers: list[tuple[int, int, str, str, str]]) -> None: ... + + @abstractmethod + async def get_peer_by_id(self, peer_id: int) -> InputPeer: ... +``` + +### 7. Error Hierarchy (errors/) +```python +# Custom exceptions for RPC errors +class SomeTelegramError(Exception): + """Description of when this occurs""" +``` + +--- + +## Testing Patterns + +### Test Structure +Tests use pytest and follow this pattern: + +```python +# Hydrogram - Telegram MTProto API Client Library for Python +# Copyright (C) 2023-present Hydrogram +# +# This file is part of Hydrogram. +# ... (license header) + +import pytest + +from hydrogram.module import ThingToTest + + +def test_something(): + result = ThingToTest.method() + assert result == expected + + +async def test_async_something(): + result = await ThingToTest.async_method() + assert result == expected +``` + +### Running Tests +```bash +pytest tests/ # Run all tests +pytest tests/test_file.py::test_func # Run specific test +pytest --cov=hydrogram # With coverage +``` + +--- + +## Development Workflow + +### Dependencies +- Use `uv` for dependency management: `uv sync --all-extras` +- Dev dependencies: ruff, pytest, pre-commit, httpx, lxml, hatchling +- Optional: tgcrypto, uvloop (for performance) + +### Testing +```bash +pytest tests/ # Run all tests +pytest tests/test_file.py::test_func # Run specific test +pytest --cov=hydrogram # With coverage +``` + +### Pre-commit +```bash +pre-commit install # Install hooks +pre-commit run --all-files # Run manually +``` + +### Code Generation +The compiler generates raw MTProto layer from TL schema: +- `compiler/api/` - API schema compiler +- `compiler/errors/` - Error compiler +- `compiler/docs/` - Documentation compiler + +Run via hatch build hooks. + +--- + +## Adding New Features + +### New Method +1. Create method file in appropriate category (e.g., `methods/messages/send_sticker.py`) +2. Follow signature pattern with type hints (see Method Implementation Pattern above) +3. Include docstring with Parameters/Returns sections +4. **IMPORTANT**: Import and add to category mixin class in `methods//__init__.py` +5. Write test in `tests/` +6. Add news fragment: `news/.feature.rst` + +### New Type +1. Create in appropriate `types/` subpackage +2. Inherit from `Object` +3. Define `__init__` with all fields +4. Add to subpackage `__init__.py` +5. Add to main `types/__init__.py` + +### New Filter +1. Add to `filters.py` +2. Create filter class inheriting from `Filter` or use filter decorator +3. Export in `filters` module + +--- + +## Common Gotchas + +1. **Async Context**: All API calls are async - never use blocking I/O +2. **Client Binding**: Objects must be bound to a client to use bound methods +3. **Raw Layer**: Use `raw` module for low-level MTProto if high-level API lacks something +4. **Session Storage**: SQLite is default; storage is pluggable via `BaseStorage` +5. **Crypto Executor**: CPU-intensive crypto runs in `ThreadPoolExecutor(1)` + +--- + +## Documentation + +- Sphinx docs in `docs/` +- Live preview: `sphinx-autobuild docs/source/ docs/build/ --watch hydrogram/` +- Follow Google docstring style +- Reference external Telegram docs where applicable + +--- + +## Release Process + +- Uses `towncrier` for changelog management +- Fragments in `news/` directory: + - `.feature.rst` - new features + - `.bugfix.rst` - bug fixes + - `.doc.rst` - documentation + - `.removal.rst` - deprecations + - `.misc.rst` - other changes +- Version defined in `hydrogram/__init__.py:__version__` + +--- + +## Important Files + +| File | Purpose | +|------|---------| +| `pyproject.toml` | Project config, dependencies, hatch build | +| `ruff.toml` | Linting/formatting rules | +| `hatch_build.py` | Custom build hooks (generates raw layer) | +| `.pre-commit-config.yaml` | Pre-commit hooks | +| `compiler/api/source/main_api.tl` | TL schema source | +| `hydrogram/__init__.py` | Public API exports | + +--- + +## Resources + +- Docs: https://docs.hydrogram.org +- Homepage: https://hydrogram.org +- Telegram: https://t.me/HydrogramNews +- Issues: https://github.com/hydrogram/hydrogram/issues +- Based on: https://github.com/pyrogram/pyrogram diff --git a/compiler/api/docs.json b/compiler/api/docs.json index 17766e448..ea6883281 100644 --- a/compiler/api/docs.json +++ b/compiler/api/docs.json @@ -77,6 +77,14 @@ "desc": "The bot attachment menu entry is available in the chat with the bot that offers it", "params": {} }, + "AuctionBidLevel": { + "desc": "{schema}", + "params": { + "amount": "", + "date": "", + "pos": "" + } + }, "Authorization": { "desc": "Logged-in session", "params": { @@ -248,12 +256,12 @@ "BotBusinessConnection": { "desc": "Contains info about a bot business connection.", "params": { - "can_reply": "Whether the bot can reply on behalf of the user to messages it receives through the business connection", "connection_id": "Business connection ID, used to identify messages coming from the connection and to reply to them as specified here \u00bb.", "date": "When was the connection created.", "dc_id": "ID of the datacenter where to send queries wrapped in a invokeWithBusinessConnection as specified here \u00bb.", "disabled": "Whether this business connection is currently disabled", "flags": "Flags, see TL conditional fields", + "rights": "Business bot rights.", "user_id": "ID of the user that the bot is connected to via this connection." } }, @@ -311,7 +319,8 @@ "has_preview_medias": "If set, the bot has some preview medias for the configured Main Mini App, see here \u00bb for more info on Main Mini App preview medias.", "menu_button": "Indicates the action to execute when pressing the in-UI menu button for bots", "privacy_policy_url": "The HTTP link to the privacy policy of the bot. If not set, then the /privacy command must be used, if supported by the bot (i.e. if it's present in the commands vector). If it isn't supported, then https://telegram.org/privacy-tpa must be opened, instead.", - "user_id": "ID of the bot" + "user_id": "ID of the bot", + "verifier_settings": "This bot can verify peers: this field contains more info about the verification the bot can assign to peers." } }, "BotInlineMediaResult": { @@ -449,50 +458,21 @@ } }, "BotVerification": { - "desc": "", - "params": {} - }, - "BotVerifierSettings": { - "desc": "", - "params": {} - }, - "BroadcastRevenueBalances": { - "desc": "Describes channel ad revenue balances \u00bb.", + "desc": "Describes a bot verification icon \u00bb.", "params": { - "available_balance": "Amount of withdrawable cryptocurrency, out of the currently available balance (available_balance <= current_balance).", - "current_balance": "Amount of not-yet-withdrawn cryptocurrency.", - "flags": "Flags, see TL conditional fields", - "overall_revenue": "Total amount of earned cryptocurrency.", - "withdrawal_enabled": "If set, the available balance can be withdrawn \u00bb." - } - }, - "BroadcastRevenueTransactionProceeds": { - "desc": "Describes earnings from sponsored messages in a channel in some time frame, see here \u00bb for more info.", - "params": { - "amount": "Amount in the smallest unit of the cryptocurrency.", - "from_date": "Start unixtime for the timeframe.", - "to_date": "End unixtime for the timeframe." + "bot_id": "ID of the bot that verified this peer", + "description": "Verification description", + "icon": "Verification icon" } }, - "BroadcastRevenueTransactionRefund": { - "desc": "Describes a refund for failed withdrawal of ad earnings \u00bb", - "params": { - "amount": "Amount refunded.", - "date": "Date of refund.", - "provider": "Payment provider name." - } - }, - "BroadcastRevenueTransactionWithdrawal": { - "desc": "Describes a withdrawal of ad earnings \u00bb", + "BotVerifierSettings": { + "desc": "Info about the current verifier bot \u00bb.", "params": { - "amount": "Amount withdrawn", - "date": "Withdrawal date", - "failed": "Whether the withdrawal has failed", + "can_modify_custom_description": "Indicates whether the bot is allowed to set a custom description field for individual verified peers, different from the custom_description provided here.", + "company": "The name of the organization that provides the verification", + "custom_description": "An optional default description for the verification", "flags": "Flags, see TL conditional fields", - "pending": "Whether the withdrawal is currently pending", - "provider": "Payment provider name", - "transaction_date": "If neither pending nor failed are set, the transaction was completed successfully, and this field will contain the point in time (Unix timestamp) when the withdrawal was completed successfully.", - "transaction_url": "If neither pending nor failed are set, the transaction was completed successfully, and this field will contain a URL where the withdrawal transaction can be viewed." + "icon": "Verification icon" } }, "BusinessAwayMessage": { @@ -534,8 +514,24 @@ } }, "BusinessBotRights": { - "desc": "", - "params": {} + "desc": "Business bot rights.", + "params": { + "change_gift_settings": "Whether the bot can change the privacy settings pertaining to gifts for the business account.", + "delete_received_messages": "Whether the bot can delete received private messages in managed chats.", + "delete_sent_messages": "Whether the bot can delete messages sent by the bot.", + "edit_bio": "Whether the bot can edit the bio of the business account.", + "edit_name": "Whether the bot can edit the first and last name of the business account.", + "edit_profile_photo": "Whether the bot can edit the profile photo of the business account.", + "edit_username": "Whether the bot can edit the username of the business account.", + "flags": "Flags, see TL conditional fields", + "manage_stories": "Whether the bot can post, edit and delete stories on behalf of the business account.", + "read_messages": "Whether the bot can mark incoming private messages as read.", + "reply": "Whether the bot can send and edit messages in private chats that had incoming messages in the last 24 hours.", + "sell_gifts": "Whether the bot can convert regular gifts owned by the business account to Telegram Stars.", + "transfer_and_upgrade_gifts": "Whether the bot can transfer and upgrade gifts owned by the business account.", + "transfer_stars": "Whether the bot can transfer Telegram Stars received by the business account to its own account, or use them to upgrade and transfer gifts.", + "view_gifts": "Whether the bot can view gifts and the amount of Telegram Stars owned by the business account." + } }, "BusinessChatLink": { "desc": "Contains info about a business chat deep link \u00bb created by the current account.", @@ -619,8 +615,11 @@ "params": { "access_hash": "Access hash, see here \u00bb for more info", "admin_rights": "Admin rights of the user in this channel (see rights)", + "autotranslation": "If set, autotranslation was enabled for all users by the admin of the channel, as specified here \u00bb.", "banned_rights": "Banned rights of the user in this channel (see rights)", + "bot_verification_icon": "Describes a bot verification icon \u00bb.", "broadcast": "Is this a channel?", + "broadcast_messages_allowed": "If set, this channel has an associated monoforum \u00bb, and its ID is specified in the linked_monoforum_id flag.", "call_active": "Whether a group call or livestream is currently active", "call_not_empty": "Whether there's anyone in the group call or livestream", "color": "The channel's accent color.", @@ -632,16 +631,19 @@ "flags": "Flags, see TL conditional fields", "flags2": "Flags, see TL conditional fields", "forum": "Whether this supergroup is a forum. Changes to this flag should invalidate the local channelFull cache for this channel/supergroup ID, see here \u00bb for more info.", + "forum_tabs": "If set, enables the tabbed forum UI \u00bb.", "gigagroup": "Whether this supergroup is a gigagroupChanges to this flag should invalidate the local channelFull cache for this channel/supergroup ID, see here \u00bb for more info.", "has_geo": "Whether this chanel has a geoposition", "has_link": "Whether this channel has a linked discussion group \u00bb (or this supergroup is a channel's discussion group). The actual ID of the linked channel/supergroup is contained in channelFull.linked_chat_id. Changes to this flag should invalidate the local channelFull cache for this channel/supergroup ID, see here \u00bb for more info.", - "id": "ID of the channel, see here \u00bb for more info", + "id": "ID of the channel, see here \u00bb for more info and the available ID range.", "join_request": "Whether a user's join request will have to be approved by administrators, toggle using channels.toggleJoinToSendChanges to this flag should invalidate the local channelFull cache for this channel/supergroup ID, see here \u00bb for more info.", "join_to_send": "Whether a user needs to join the supergroup before they can send messages: can be false only for discussion groups \u00bb, toggle using channels.toggleJoinToSendChanges to this flag should invalidate the local channelFull cache for this channel/supergroup ID, see here \u00bb for more info.", "left": "Whether the current user has left or is not a member of this channel", "level": "Boost level. Changes to this flag should invalidate the local channelFull cache for this channel/supergroup ID, see here \u00bb for more info.", + "linked_monoforum_id": "For channels with associated monoforums, the monoforum ID. For Monoforums, the ID of the associated channel.", "megagroup": "Is this a supergroup? Changes to this flag should invalidate the local channelFull cache for this channel/supergroup ID, see here \u00bb for more info.", "min": "See min", + "monoforum": "If set, this is a monoforum \u00bb, and the ID of the associated channel is specified in the linked_monoforum_id.", "noforwards": "Whether this channel or group is protected, thus does not allow forwarding messages from it", "participants_count": "Participant count", "photo": "Profile photo", @@ -649,6 +651,7 @@ "restricted": "Whether viewing/writing in this channel for a reason (see restriction_reason)", "restriction_reason": "Contains the reason why access to this channel must be restricted. Changes to this flag should invalidate the local channelFull cache for this channel/supergroup ID, see here \u00bb for more info.", "scam": "This channel/supergroup is probably a scam Changes to this flag should invalidate the local channelFull cache for this channel/supergroup ID, see here \u00bb for more info.", + "send_paid_messages_stars": "If set, this supergroup or monoforum has enabled paid messages \u00bb, we might need to pay the specified amount of Stars to send messages to it, depending on the configured exceptions: check channelFull.send_paid_messages_stars to see if the currently logged in user actually has to pay or not, see here \u00bb for the full flow (only set for the monoforum, not the associated channel).", "signature_profiles": "If set, messages sent by admins to this channel will link to the admin's profile (just like with groups).", "signatures": "Whether signatures are enabled (channels)", "slowmode_enabled": "Whether slow mode is enabled for groups to prevent flood in chat. Changes to this flag should invalidate the local channelFull cache for this channel/supergroup ID, see here \u00bb for more info.", @@ -841,6 +844,14 @@ "invite": "The invite link that was revoked" } }, + "ChannelAdminLogEventActionParticipantEditRank": { + "desc": "{schema}", + "params": { + "new_rank": "", + "prev_rank": "", + "user_id": "" + } + }, "ChannelAdminLogEventActionParticipantInvite": { "desc": "A user was invited to the group", "params": { @@ -941,6 +952,12 @@ "new_value": "Whether antispam functionality was enabled or disabled." } }, + "ChannelAdminLogEventActionToggleAutotranslation": { + "desc": "Channel autotranslation was toggled \u00bb.", + "params": { + "new_value": "New value of the toggle" + } + }, "ChannelAdminLogEventActionToggleForum": { "desc": "Forum functionality was enabled or disabled.", "params": { @@ -1003,6 +1020,7 @@ "delete": "Message deletion events", "demote": "Admin demotion events", "edit": "Message edit events", + "edit_rank": "", "flags": "Flags, see TL conditional fields", "forums": "Forum-related events", "group_call": "Group call events", @@ -1029,6 +1047,7 @@ "flags": "Flags, see TL conditional fields", "id": "Channel ID", "megagroup": "Is this a supergroup", + "monoforum": "", "title": "Title", "until_date": "The ban is valid until the specified date" } @@ -1046,6 +1065,7 @@ "boosts_applied": "The number of boosts the current user has applied to the current supergroup.", "boosts_unrestrict": "The number of boosts this supergroup requires to bypass slowmode and other restrictions, see here \u00bb for more info.", "bot_info": "Info about bots in the channel/supergroup", + "bot_verification": "Bot verification icon", "call": "Livestream or group call information", "can_delete_channel": "Can we delete this channel?", "can_set_location": "Can we set the geolocation of this group (for geogroups)", @@ -1069,11 +1089,13 @@ "kicked_count": "Number of users kicked from the channel", "linked_chat_id": "ID of the linked discussion chat for channels (and vice versa, the ID of the linked channel for discussion chats).", "location": "Location of the geogroup", + "main_tab": "The main tab for the channel's profile, see here \u00bb for more info.", "migrated_from_chat_id": "The chat ID from which this group was migrated", "migrated_from_max_id": "The message ID in the original chat at which this group was migrated", "notify_settings": "Notification settings", "online_count": "Number of users currently online", "paid_media_allowed": "Whether the current user can send or forward paid media \u00bb to this channel.", + "paid_messages_available": "If set, admins may enable enable paid messages \u00bb in this supergroup.", "paid_reactions_available": "If set, users may send paid Telegram Star reactions \u00bb to messages of this channel.", "participants_count": "Number of participants of the channel", "participants_hidden": "Whether the participant list is hidden.", @@ -1086,8 +1108,11 @@ "recent_requesters": "IDs of users who requested to join recently", "requests_pending": "Pending join requests \u00bb", "restricted_sponsored": "Whether ads on this channel were disabled as specified here \u00bb (this flag is only visible to the owner of the channel).", + "send_paid_messages_stars": "If set and bigger than 0, this supergroup, monoforum or the monoforum associated to this channel has enabled paid messages \u00bb and we must pay the specified amount of Stars to send messages to it, see here \u00bb for the full flow. This flag will be set both for the monoforum and for channelFull of the associated channel). If set and equal to 0, the monoforum requires payment in general but we were exempted from paying.", "slowmode_next_send_date": "Indicates when the user will be allowed to send another message in the supergroup (unixtime)", "slowmode_seconds": "If specified, users in supergroups will only be able to send one message every slowmode_seconds seconds", + "stargifts_available": "If set, users may send Gifts \u00bb to this channel.", + "stargifts_count": "Admins with chatAdminRights.post_messages rights will see the total number of received gifts, everyone else will see the number of gifts added to the channel's profile.", "stats_dc": "If set, specifies the DC to use for fetching channel statistics", "stickerset": "Associated stickerset", "stories": "Channel stories", @@ -1128,6 +1153,7 @@ "params": { "date": "Date joined", "flags": "Flags, see TL conditional fields", + "rank": "", "subscription_until_date": "If set, contains the expiration date of the current Telegram Star subscription period \u00bb for the specified participant.", "user_id": "Participant user ID" } @@ -1154,7 +1180,8 @@ "flags": "Flags, see TL conditional fields", "kicked_by": "User was kicked by the specified admin", "left": "Whether the user has left the group", - "peer": "The banned peer" + "peer": "The banned peer", + "rank": "" } }, "ChannelParticipantCreator": { @@ -1178,6 +1205,7 @@ "date": "When did I join the channel/supergroup", "flags": "Flags, see TL conditional fields", "inviter_id": "User that invited me to the channel/supergroup", + "rank": "", "subscription_until_date": "If set, contains the expiration date of the current Telegram Star subscription period \u00bb for the specified participant.", "user_id": "User ID", "via_request": "Whether I joined upon specific approval of an admin" @@ -1238,7 +1266,7 @@ "deactivated": "Whether the group was migrated", "default_banned_rights": "Default banned rights of all users in the group", "flags": "Flags, see TL conditional fields", - "id": "ID of the group, see here \u00bb for more info", + "id": "ID of the group, see here \u00bb for more info and the available ID range.", "left": "Whether the current user has left the group", "migrated_to": "Means this chat was upgraded to a supergroup", "noforwards": "Whether this group is protected, thus does not allow forwarding messages from it", @@ -1262,6 +1290,8 @@ "flags": "Flags, see TL conditional fields", "invite_users": "If set, allows the admin to invite users in the channel/supergroup", "manage_call": "If set, allows the admin to change group call/livestream settings", + "manage_direct_messages": "If set, allows the admin to manage the direct messages monoforum \u00bb and decline suggested posts \u00bb.", + "manage_ranks": "", "manage_topics": "If set, allows the admin to create, delete or modify forum topics \u00bb.", "other": "Set this flag if none of the other flags are set, but you still want the user to be an admin: if this or any of the other flags are set, the admin can get the chat admin log, get chat statistics, get message statistics in channels, get channel members, see anonymous administrators in supergroups and ignore slow mode.", "pin_messages": "If set, allows the admin to pin messages in the channel/supergroup", @@ -1281,6 +1311,7 @@ "desc": "Represents the rights of a normal user in a supergroup/channel/chat. In this case, the flags are inverted: if set, a flag does not allow a user to do X.", "params": { "change_info": "If set, does not allow any user to change the description of a supergroup/chat", + "edit_rank": "", "embed_links": "If set, does not allow a user to embed links in the messages of a supergroup/chat", "flags": "Flags, see TL conditional fields", "invite_users": "If set, does not allow any user to invite users in a supergroup/chat", @@ -1347,6 +1378,7 @@ "desc": "Chat invite info", "params": { "about": "Description of the group of channel", + "bot_verification": "Describes a bot verification icon \u00bb.", "broadcast": "Whether this is a channel", "can_refulfill_subscription": "If set, indicates that the user has already paid for the associated Telegram Star subscriptions \u00bb and it hasn't expired yet, so they may re-join the channel using messages.importChatInvite without repeating the payment.", "channel": "Whether this is a channel/supergroup or a normal group", @@ -1425,7 +1457,9 @@ "desc": "Group member.", "params": { "date": "Date added to the group", + "flags": "Flags, see TL conditional fields", "inviter_id": "ID of the user that added the member to the group", + "rank": "", "user_id": "Member user ID" } }, @@ -1433,13 +1467,17 @@ "desc": "Chat admin", "params": { "date": "Date when the user was added", + "flags": "Flags, see TL conditional fields", "inviter_id": "ID of the user that added the member to the group", + "rank": "", "user_id": "ID of a group member that is admin" } }, "ChatParticipantCreator": { "desc": "Represents the creator of the group", "params": { + "flags": "Flags, see TL conditional fields", + "rank": "", "user_id": "ID of the user that created the group" } }, @@ -1490,6 +1528,19 @@ "reactions": "Allowed set of reactions: the reactions_in_chat_max configuration field indicates the maximum number of reactions that can be specified in this field." } }, + "ChatTheme": { + "desc": "A chat theme", + "params": { + "emoticon": "The emoji identifying the chat theme." + } + }, + "ChatThemeUniqueGift": { + "desc": "A chat theme based on a collectible gift \u00bb.", + "params": { + "gift": "The owned collectible gift on which this theme is based, as a starGiftUnique constructor.", + "theme_settings": "Theme settings." + } + }, "CodeSettings": { "desc": "Settings used by telegram servers for sending the confirm code.", "params": { @@ -1562,9 +1613,9 @@ "desc": "Contains info about a connected business bot \u00bb.", "params": { "bot_id": "ID of the connected bot", - "can_reply": "Whether the the bot can reply to messages it receives through the connection", "flags": "Flags, see TL conditional fields", - "recipients": "Specifies the private chats that a connected business bot \u00bb may receive messages and interact with." + "recipients": "Specifies the private chats that a connected business bot \u00bb may receive messages and interact with.", + "rights": "Business bot rights." } }, "ConnectedBotStarRef": { @@ -1669,7 +1720,8 @@ "include_peers": "Include the following chats in this folder", "non_contacts": "Whether to include all non-contacts in this folder", "pinned_peers": "Pinned chats, folders can have unlimited pinned chats", - "title": "Folder name (max 12 UTF-8 chars)" + "title": "Folder name (max 12 UTF-8 chars)", + "title_noanimate": "If set, any animated emojis present in title should not be animated and should be instead frozen on the first frame." } }, "DialogFilterChatlist": { @@ -1682,7 +1734,8 @@ "id": "ID of the folder", "include_peers": "Chats to include in the folder", "pinned_peers": "Pinned chats, folders can have unlimited pinned chats", - "title": "Name of the folder (max 12 UTF-8 chars)" + "title": "Name of the folder (max 12 UTF-8 chars)", + "title_noanimate": "If set, any animated emojis present in title should not be animated and should be instead frozen on the first frame." } }, "DialogFilterDefault": { @@ -1723,8 +1776,15 @@ } }, "DisallowedGiftsSettings": { - "desc": "", - "params": {} + "desc": "Disallow the reception of specific gift types.", + "params": { + "disallow_limited_stargifts": "Disallow the reception of limited-supply gifts (those with the starGift.limited flag set).", + "disallow_premium_gifts": "Disallow the reception of gifted Telegram Premium subscriptions \u00bb.", + "disallow_stargifts_from_channels": "", + "disallow_unique_stargifts": "Disallow the reception of collectible gifts \u00bb.", + "disallow_unlimited_stargifts": "Disallow the reception of gifts with an unlimited supply (those with the starGift.limited flag not set).", + "flags": "Flags, see TL conditional fields" + } }, "Document": { "desc": "Document", @@ -1796,7 +1856,18 @@ }, "DocumentAttributeVideo": { "desc": "Defines a video", - "params": {} + "params": { + "duration": "Duration in seconds", + "flags": "Flags, see TL conditional fields", + "h": "Video height", + "nosound": "Whether the specified document is a video file with no audio tracks", + "preload_prefix_size": "Number of bytes to preload when preloading videos (particularly video stories).", + "round_message": "Whether this is a round video", + "supports_streaming": "Whether the video supports streaming", + "video_codec": "Codec used for the video, i.e. \"h264\", \"h265\", or \"av1\"", + "video_start_ts": "Floating point UNIX timestamp in seconds, indicating the frame of the video that should be used as static preview and thumbnail.", + "w": "Video width" + } }, "DocumentEmpty": { "desc": "Empty constructor, document doesn't exist.", @@ -1815,7 +1886,8 @@ "media": "Media.", "message": "The draft", "no_webpage": "Whether no webpage preview will be generated", - "reply_to": "If set, indicates that the message should be sent in reply to the specified message or story." + "reply_to": "If set, indicates that the message should be sent in reply to the specified message or story.", + "suggested_post": "Used to suggest a post to a channel, see here \u00bb for more info on the full flow." } }, "DraftMessageEmpty": { @@ -1924,12 +1996,26 @@ "EmojiStatus": { "desc": "An emoji status", "params": { - "document_id": "Custom emoji document ID" + "document_id": "Custom emoji document ID", + "flags": "Flags, see TL conditional fields", + "until": "If set, the emoji status will be active until the specified unixtime." } }, "EmojiStatusCollectible": { - "desc": "", - "params": {} + "desc": "An owned collectible gift \u00bb as emoji status.", + "params": { + "center_color": "Color of the center of the profile backdrop in RGB24 format, from the gift's starGiftAttributeBackdrop.", + "collectible_id": "ID of the collectible (from starGiftUnique.id).", + "document_id": "ID of the custom emoji representing the status.", + "edge_color": "Color of the edges of the profile backdrop in RGB24 format, from the gift's starGiftAttributeBackdrop.", + "flags": "Flags, see TL conditional fields", + "pattern_color": "Color of the pattern_document_id applied on the profile backdrop in RGB24 format, from the gift's starGiftAttributeBackdrop.", + "pattern_document_id": "The ID of a pattern to apply on the profile's backdrop, correlated to the starGiftAttributePattern from the gift in slug.", + "slug": "Unique identifier of the collectible that may be used to create a collectible gift link \u00bb for the current collectible, or to fetch further info about the collectible using payments.getUniqueStarGift.", + "text_color": "Color of text on the profile backdrop in RGB24 format, from the gift's starGiftAttributeBackdrop.", + "title": "Name of the collectible.", + "until": "If set, the emoji status will be active until the specified unixtime." + } }, "EmojiStatusEmpty": { "desc": "No emoji status is set", @@ -2103,11 +2189,13 @@ "id": "Topic ID", "my": "Whether the topic was created by the current user", "notify_settings": "Notification settings", + "peer": "", "pinned": "Whether the topic is pinned", "read_inbox_max_id": "Position up to which all incoming messages are read.", "read_outbox_max_id": "Position up to which all outgoing messages are read.", "short": "Whether this constructor is a reduced version of the full topic information. If set, only the my, closed, id, date, title, icon_color, icon_emoji_id and from_id parameters will contain valid information. Reduced info is usually only returned in topic-related admin log events \u00bb and in the messages.channelMessages constructor: if needed, full information can be fetched using channels.getForumTopicsByID.", "title": "Topic title", + "title_missing": "", "top_message": "ID of the last message that was sent to this topic", "unread_count": "Number of unread messages", "unread_mentions_count": "Number of unread mentions", @@ -2168,11 +2256,14 @@ "desc": "Global privacy settings", "params": { "archive_and_mute_new_noncontact_peers": "Whether to archive and mute new chats from non-contacts", + "disallowed_gifts": "Disallows the reception of specific gift types.", + "display_gifts_button": "Enables or disables our userFull.display_gifts_button flag: if the userFull.display_gifts_button flag of both us and another user is set, a gift button should always be displayed in the text field in private chats with the other user: once clicked, the gift UI should be displayed, offering the user options to gift Telegram Premium \u00bb subscriptions or Telegram Gifts \u00bb.", "flags": "Flags, see TL conditional fields", "hide_read_marks": "If this flag is set, the inputPrivacyKeyStatusTimestamp key will also apply to the ability to use messages.getOutboxReadDate on messages sent to us. Meaning, users that cannot see our exact last online date due to the current value of the inputPrivacyKeyStatusTimestamp key will receive a 403 USER_PRIVACY_RESTRICTED error when invoking messages.getOutboxReadDate to fetch the exact read date of a message they sent to us. The userFull.read_dates_private flag will be set for users that have this flag enabled.", "keep_archived_folders": "Whether unmuted chats that are always included or pinned in a folder, will be kept in the Archive chat list when they get a new message. Ignored if keep_archived_unmuted is set.", "keep_archived_unmuted": "Whether unmuted chats will be kept in the Archive chat list when they get a new message.", - "new_noncontact_peers_require_premium": "If set, only users that have a premium account, are in our contact list, or already have a private chat with us can write to us; a 403 PRIVACY_PREMIUM_REQUIRED error will be emitted otherwise. The userFull.contact_require_premium flag will be set for users that have this flag enabled. To check whether we can write to a user with this flag enabled, if we haven't yet cached all the required information (for example we don't have the userFull or history of all users while displaying the chat list in the sharing UI) the users.getIsPremiumRequiredToContact method may be invoked, passing the list of users currently visible in the UI, returning a list of booleans that directly specify whether we can or cannot write to each user. This option may be enabled by both non-Premium and Premium users only if the new_noncontact_peers_require_premium_without_ownpremium client configuration flag \u00bb is equal to true, otherwise it may be enabled only by Premium users and non-Premium users will receive a PREMIUM_ACCOUNT_REQUIRED error when trying to enable this flag." + "new_noncontact_peers_require_premium": "See here for more info on this flag \u00bb.", + "noncontact_peers_paid_stars": "If configured, specifies the number of stars users must pay us to send us a message, see here \u00bb for more info on paid messages." } }, "GroupCall": { @@ -2180,18 +2271,26 @@ "params": { "access_hash": "Group call access hash", "can_change_join_muted": "Whether the current user can change the value of the join_muted flag using phone.toggleGroupCallSettings", + "can_change_messages_enabled": "", "can_start_video": "Whether you can start streaming video into the call", + "conference": "Whether this is an E2E conference call.", + "creator": "Whether we're created this group call.", + "default_send_as": "", "flags": "Flags, see TL conditional fields", "id": "Group call ID", + "invite_link": "Invitation link for the conference.", "join_date_asc": "Specifies the ordering to use when locally sorting by date and displaying in the UI group call participants.", "join_muted": "Whether the user should be muted upon joining the call", "listeners_hidden": "Whether the listeners list is hidden and cannot be fetched using phone.getGroupParticipants. The phone.groupParticipants.count and groupCall.participants_count counters will still include listeners.", + "messages_enabled": "", + "min": "", "participants_count": "Participant count", "record_start_date": "When was the recording started", "record_video_active": "Whether the group call is currently being recorded", "rtmp_stream": "Whether RTMP streams are allowed", "schedule_date": "When is the call scheduled to start", "schedule_start_subscribed": "Whether we subscribed to the scheduled call", + "send_paid_messages_stars": "", "stream_dc_id": "DC ID to be used for livestream chunks", "title": "Group call title", "unmuted_video_count": "Number of people currently streaming video into the call", @@ -2207,6 +2306,28 @@ "id": "Group call ID" } }, + "GroupCallDonor": { + "desc": "{schema}", + "params": { + "flags": "Flags, see TL conditional fields", + "my": "", + "peer_id": "", + "stars": "", + "top": "" + } + }, + "GroupCallMessage": { + "desc": "{schema}", + "params": { + "date": "", + "flags": "Flags, see TL conditional fields", + "from_admin": "", + "from_id": "", + "id": "", + "message": "", + "paid_message_stars": "" + } + }, "GroupCallParticipant": { "desc": "Info about a group call participant", "params": { @@ -2220,6 +2341,7 @@ "min": "If not set, the volume and muted_by_you fields can be safely used to overwrite locally cached information; otherwise, volume will contain valid information only if volume_by_admin is set both in the cache and in the received constructor.", "muted": "Whether the participant is muted", "muted_by_you": "Whether this participant was muted by the current user", + "paid_stars_total": "", "peer": "Peer information", "presentation": "Info about the screen sharing stream the participant is currently broadcasting", "raise_hand_rating": "Specifies the UI visualization order of peers with raised hands: peers with a higher rating should be showed first in the list.", @@ -2574,6 +2696,22 @@ "desc": "Empty constructor, remove group photo.", "params": {} }, + "InputChatTheme": { + "desc": "Set an emoji-based chat theme, returned by account.getChatThemes.", + "params": { + "emoticon": "The emoji." + } + }, + "InputChatThemeEmpty": { + "desc": "Remove any currently configured theme.", + "params": {} + }, + "InputChatThemeUniqueGift": { + "desc": "Set a theme based on an owned collectible gift \u00bb, returned by account.getUniqueGiftChatThemes.", + "params": { + "slug": "The slug from starGiftUnique.slug." + } + }, "InputChatUploadedPhoto": { "desc": "New photo to be set as group profile photo.", "params": { @@ -2655,8 +2793,12 @@ } }, "InputEmojiStatusCollectible": { - "desc": "", - "params": {} + "desc": "An owned collectible gift \u00bb as emoji status: can only be used in account.updateEmojiStatus, is never returned by the API.", + "params": { + "collectible_id": "ID of the collectible (from starGiftUnique.id).", + "flags": "Flags, see TL conditional fields", + "until": "If set, the emoji status will be active until the specified unixtime." + } }, "InputEncryptedChat": { "desc": "Creates an encrypted chat.", @@ -2773,6 +2915,18 @@ "id": "Group call ID" } }, + "InputGroupCallInviteMessage": { + "desc": "Join a group call through a messageActionConferenceCall invitation message.", + "params": { + "msg_id": "ID of the messageActionConferenceCall." + } + }, + "InputGroupCallSlug": { + "desc": "Join a conference call through an invitation link \u00bb.", + "params": { + "slug": "Slug from the conference link \u00bb." + } + }, "InputGroupCallStream": { "desc": "Chunk of a livestream", "params": { @@ -2784,6 +2938,13 @@ "video_quality": "Selected video quality (0 = lowest, 1 = medium, 2 = best)" } }, + "InputInvoiceBusinessBotTransferStars": { + "desc": "Transfer stars from the balance of a user account connected to a business bot, to the balance of the business bot, see here \u00bb for more info on the full flow.", + "params": { + "bot": "Always inputUserSelf.", + "stars": "The number of stars to transfer." + } + }, "InputInvoiceChatInviteSubscription": { "desc": "Used to pay for a Telegram Star subscription \u00bb.", "params": { @@ -2797,6 +2958,12 @@ "peer": "Chat where the invoice/paid media was sent" } }, + "InputInvoicePremiumAuthCode": { + "desc": "Used to pay for login codes, in case of high cost of SMS verification codes for the user's country/provider, see here \u00bb for more info.", + "params": { + "purpose": "Must contain an inputStorePaymentAuthCode." + } + }, "InputInvoicePremiumGiftCode": { "desc": "Used if the user wishes to start a channel/supergroup giveaway or send some giftcodes to members of a channel/supergroup, in exchange for boosts.", "params": { @@ -2805,8 +2972,13 @@ } }, "InputInvoicePremiumGiftStars": { - "desc": "", - "params": {} + "desc": "Used to gift a Telegram Premium subscription to another user, paying with Telegram Stars.", + "params": { + "flags": "Flags, see TL conditional fields", + "message": "Message attached with the gift.", + "months": "Duration of the subscription in months, must be one of the options with currency == \"XTR\" returned by payments.getPremiumGiftCodeOptions.", + "user_id": "Who will receive the gifted subscription." + } }, "InputInvoiceSlug": { "desc": "An invoice slug taken from an invoice deep link or from the premium_invoice_slug app config parameter \u00bb", @@ -2820,17 +2992,59 @@ "flags": "Flags, see TL conditional fields", "gift_id": "Identifier of the gift, from starGift.id", "hide_name": "If set, your name will be hidden if the destination user decides to display the gift on their profile (they will still see that you sent the gift)", + "include_upgrade": "Also pay for an eventual upgrade of the gift to a collectible gift \u00bb.", "message": "Optional message, attached with the gift. The maximum length for this field is specified in the stargifts_message_length_max client configuration value \u00bb.", - "user_id": "Identifier of the user that will receive the gift" + "peer": "Receiver of the gift." + } + }, + "InputInvoiceStarGiftAuctionBid": { + "desc": "{schema}", + "params": { + "bid_amount": "", + "flags": "Flags, see TL conditional fields", + "gift_id": "", + "hide_name": "", + "message": "", + "peer": "", + "update_bid": "" + } + }, + "InputInvoiceStarGiftDropOriginalDetails": { + "desc": "{schema}", + "params": { + "stargift": "" + } + }, + "InputInvoiceStarGiftPrepaidUpgrade": { + "desc": "Separately prepay for the upgrade of a gift \u00bb.", + "params": { + "hash": "The upgrade hash from messageActionStarGift.prepaid_upgrade_hash or savedStarGift.prepaid_upgrade_hash.", + "peer": "The peer that owns the gift." + } + }, + "InputInvoiceStarGiftResale": { + "desc": "Used to buy a collectible gift currently up on resale, see here for more info on the full flow.", + "params": { + "flags": "Flags, see TL conditional fields", + "slug": "Slug of the gift to buy.", + "to_id": "The receiver of the gift.", + "ton": "Buy the gift using TON." } }, "InputInvoiceStarGiftTransfer": { - "desc": "", - "params": {} + "desc": "Used to pay to transfer a collectible gift to another peer, see the gifts \u00bb documentation for more info.", + "params": { + "stargift": "The identifier of the received gift", + "to_id": "The destination peer" + } }, "InputInvoiceStarGiftUpgrade": { - "desc": "", - "params": {} + "desc": "Used to pay to upgrade a Gift to a collectible gift, see the collectible gifts \u00bb documentation for more info on the full flow.", + "params": { + "flags": "Flags, see TL conditional fields", + "keep_original_details": "Set this flag to keep the original gift text, sender and receiver in the upgraded gift as a starGiftAttributeOriginalDetails attribute.", + "stargift": "The identifier of the received gift to upgrade." + } }, "InputInvoiceStars": { "desc": "Used to top up the Telegram Stars balance of the current account or someone else's account, or to start a Telegram Star giveaway \u00bb.", @@ -2847,6 +3061,7 @@ "name_requested": "Set this flag to request the peer's name.", "peer_type": "Filtering criteria to use for the peer selection list shown to the user. The list should display all existing peers of the specified type, and should also offer an option for the user to create and immediately use one or more (up to max_quantity) peers of the specified type, if needed.", "photo_requested": "Set this flag to request the peer's photo (if any).", + "style": "", "text": "Button text", "username_requested": "Set this flag to request the peer's @username (if any)." } @@ -2858,6 +3073,7 @@ "flags": "Flags, see TL conditional fields", "fwd_text": "New text of the button in forwarded messages.", "request_write_access": "Set this flag to request the permission for your bot to send messages to the user.", + "style": "", "text": "Button text", "url": "An HTTP URL to be opened with user authorization data added to the query string when the button is pressed. If the user refuses to provide authorization data, the original URL without information about the user will be opened. The data added is the same as described in Receiving authorization data.NOTE: You must always check the hash of the received data to verify the authentication and the integrity of the data as described in Checking authorization." } @@ -2865,6 +3081,8 @@ "InputKeyboardButtonUserProfile": { "desc": "Button that links directly to a user profile", "params": { + "flags": "Flags, see TL conditional fields", + "style": "", "text": "Button text", "user_id": "User ID" } @@ -2907,7 +3125,9 @@ "id": "The document to be forwarded.", "query": "Text query or emoji that was used by the user to find this sticker or GIF: used to improve search result relevance.", "spoiler": "Whether this media should be hidden behind a spoiler warning", - "ttl_seconds": "Time to live of self-destructing document" + "ttl_seconds": "Time to live of self-destructing document", + "video_cover": "Custom video cover.", + "video_timestamp": "Start playing the video at the specified timestamp (seconds)." } }, "InputMediaDocumentExternal": { @@ -2916,7 +3136,9 @@ "flags": "Flags, see TL conditional fields", "spoiler": "Whether this media should be hidden behind a spoiler warning", "ttl_seconds": "Self-destruct time to live of document", - "url": "URL of the document" + "url": "URL of the document", + "video_cover": "Custom video cover.", + "video_timestamp": "Start playing the video at the specified timestamp (seconds)." } }, "InputMediaEmpty": { @@ -2998,6 +3220,14 @@ "solution_entities": "Message entities for styled text" } }, + "InputMediaStakeDice": { + "desc": "{schema}", + "params": { + "client_seed": "", + "game_hash": "", + "ton_amount": "" + } + }, "InputMediaStory": { "desc": "Forwarded story", "params": { @@ -3005,9 +3235,28 @@ "peer": "Peer where the story was posted" } }, + "InputMediaTodo": { + "desc": "Creates a todo list \u00bb.", + "params": { + "todo": "The todo list." + } + }, "InputMediaUploadedDocument": { "desc": "New document", - "params": {} + "params": { + "attributes": "Attributes that specify the type of the document (video, audio, voice, sticker, etc.)", + "file": "The uploaded file", + "flags": "Flags, see TL conditional fields", + "force_file": "Force the media file to be uploaded as document", + "mime_type": "MIME type of document", + "nosound_video": "Whether to send the file as a video even if it doesn't have an audio track (i.e. if set, the documentAttributeAnimated attribute will not be set even for videos without audio)", + "spoiler": "Whether this media should be hidden behind a spoiler warning", + "stickers": "Attached stickers", + "thumb": "Thumbnail of the document, uploaded as for the file", + "ttl_seconds": "Time to live in seconds of self-destructing document", + "video_cover": "Start playing the video at the specified timestamp (seconds).", + "video_timestamp": "Start playing the video at the specified timestamp (seconds)." + } }, "InputMediaUploadedPhoto": { "desc": "Photo", @@ -3167,6 +3416,36 @@ "desc": "Notifications generated by all users.", "params": {} }, + "InputPasskeyCredentialFirebasePNV": { + "desc": "{schema}", + "params": { + "pnv_token": "" + } + }, + "InputPasskeyCredentialPublicKey": { + "desc": "{schema}", + "params": { + "id": "", + "raw_id": "", + "response": "" + } + }, + "InputPasskeyResponseLogin": { + "desc": "{schema}", + "params": { + "authenticator_data": "", + "client_data": "", + "signature": "", + "user_handle": "" + } + }, + "InputPasskeyResponseRegister": { + "desc": "{schema}", + "params": { + "attestation_data": "", + "client_data": "" + } + }, "InputPaymentCredentials": { "desc": "Payment credentials", "params": { @@ -3215,6 +3494,12 @@ "chat_id": "Chat identifier" } }, + "InputPeerColorCollectible": { + "desc": "{schema}", + "params": { + "collectible_id": "" + } + }, "InputPeerEmpty": { "desc": "An empty constructor, no user or chat is defined.", "params": {} @@ -3272,7 +3557,9 @@ "params": { "client_id": "An arbitrary 64-bit integer: it should be set, for example, to an incremental number when using contacts.importContacts, in order to retry importing only the contacts that weren't imported successfully, according to the client_ids returned in contacts.importedContacts.retry_contacts.", "first_name": "Contact's first name", + "flags": "Flags, see TL conditional fields", "last_name": "Contact's last name", + "note": "", "phone": "Phone number" } }, @@ -3329,7 +3616,7 @@ "params": {} }, "InputPrivacyKeyNoPaidMessages": { - "desc": "", + "desc": "Who can send you messages without paying, if paid messages \u00bb are enabled.", "params": {} }, "InputPrivacyKeyPhoneCall": { @@ -3348,6 +3635,10 @@ "desc": "Whether people will be able to see your profile picture", "params": {} }, + "InputPrivacyKeySavedMusic": { + "desc": "{schema}", + "params": {} + }, "InputPrivacyKeyStarGiftsAutoSave": { "desc": "Whether received gifts will be automatically displayed on our profile", "params": {} @@ -3371,7 +3662,7 @@ "InputPrivacyValueAllowChatParticipants": { "desc": "Allow only participants of certain chats", "params": { - "chats": "Allowed chat IDs" + "chats": "Allowed chat IDs (either a chat or a supergroup ID, verbatim the way it is received in the constructor (i.e. unlike with bot API IDs, here group and supergroup IDs should be treated in the same way))." } }, "InputPrivacyValueAllowCloseFriends": { @@ -3403,7 +3694,7 @@ "InputPrivacyValueDisallowChatParticipants": { "desc": "Disallow only participants of certain chats", "params": { - "chats": "Disallowed chat IDs" + "chats": "Disallowed chat IDs (either a chat or a supergroup ID, verbatim the way it is received in the constructor (i.e. unlike with bot API IDs, here group and supergroup IDs should be treated in the same way))." } }, "InputPrivacyValueDisallowContacts": { @@ -3432,14 +3723,22 @@ "desc": "Reply to a message.", "params": { "flags": "Flags, see TL conditional fields", + "monoforum_peer_id": "Must be set to the ID of the topic when replying to a message within a monoforum topic.", "quote_entities": "Message entities for styled text from the quote_text field.", "quote_offset": "Offset of the message quote_text within the original message (in UTF-16 code units).", "quote_text": "Used to quote-reply to only a certain section (specified here) of the original message. The maximum UTF-8 length for quotes is specified in the quote_length_max config key.", "reply_to_msg_id": "The message ID to reply to.", "reply_to_peer_id": "Used to reply to messages sent to another chat (specified here), can only be used for non-protected chats and messages.", + "todo_item_id": "Can be set to reply to the specified item of a todo list \u00bb.", "top_msg_id": "This field must contain the topic ID only when replying to messages in forum topics different from the \"General\" topic (i.e. reply_to_msg_id is set and reply_to_msg_id != topicID and topicID != 1). If the replied-to message is deleted before the method finishes execution, the value in this field will be used to send the message to the correct topic, instead of the \"General\" topic." } }, + "InputReplyToMonoForum": { + "desc": "Used to send messages to a monoforum topic.", + "params": { + "monoforum_peer_id": "The topic ID." + } + }, "InputReplyToStory": { "desc": "Reply to a story.", "params": { @@ -3488,12 +3787,23 @@ "params": {} }, "InputSavedStarGiftChat": { - "desc": "", - "params": {} + "desc": "A gift received by a channel we own.", + "params": { + "peer": "The channel.", + "saved_id": "ID of the gift, must be the saved_id of a messageActionStarGift/messageActionStarGiftUnique constructor." + } + }, + "InputSavedStarGiftSlug": { + "desc": "Points to a collectible gift obtained from a collectible gift link \u00bb.", + "params": { + "slug": "Slug from the link." + } }, "InputSavedStarGiftUser": { - "desc": "", - "params": {} + "desc": "A gift received in a private chat with another user.", + "params": { + "msg_id": "ID of the messageService with the messageActionStarGift with the gift." + } }, "InputSecureFile": { "desc": "Pre-uploaded passport file, for more info see the passport docs \u00bb", @@ -3543,6 +3853,18 @@ "random_id": "Unique client media ID required to prevent message resending" } }, + "InputStarGiftAuction": { + "desc": "{schema}", + "params": { + "gift_id": "" + } + }, + "InputStarGiftAuctionSlug": { + "desc": "{schema}", + "params": { + "slug": "" + } + }, "InputStarsTransaction": { "desc": "Used to fetch info about a Telegram Star transaction \u00bb.", "params": { @@ -3619,6 +3941,10 @@ "thumb_version": "Thumbnail version" } }, + "InputStickerSetTonGifts": { + "desc": "TON gifts stickerset.", + "params": {} + }, "InputStickeredMediaDocument": { "desc": "A document with stickers attached", "params": { @@ -3632,8 +3958,15 @@ } }, "InputStorePaymentAuthCode": { - "desc": "", - "params": {} + "desc": "Indicates payment for a login code.", + "params": { + "amount": "Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).", + "currency": "Three-letter ISO 4217 currency code", + "flags": "Flags, see TL conditional fields", + "phone_code_hash": "phone_code_hash returned by auth.sendCode.", + "phone_number": "Phone number.", + "restore": "Set this flag to restore a previously made purchase." + } }, "InputStorePaymentGiftPremium": { "desc": "Info about a gifted Telegram Premium purchase", @@ -3710,6 +4043,8 @@ "params": { "amount": "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).", "currency": "Three-letter ISO 4217 currency code", + "flags": "Flags, see TL conditional fields", + "spend_purpose_peer": "Should be populated with the peer where the topup process was initiated due to low funds (i.e. a bot for bot payments, a channel for paid media/reactions, etc); leave this flag unpopulated if the topup flow was not initated when attempting to spend more Stars than currently available on the account's balance.", "stars": "Amount of stars to topup" } }, @@ -3887,12 +4222,16 @@ "KeyboardButton": { "desc": "Bot keyboard button", "params": { + "flags": "Flags, see TL conditional fields", + "style": "", "text": "Button text" } }, "KeyboardButtonBuy": { "desc": "Button to buy a product", "params": { + "flags": "Flags, see TL conditional fields", + "style": "", "text": "Button text" } }, @@ -3902,6 +4241,7 @@ "data": "Callback data", "flags": "Flags, see TL conditional fields", "requires_password": "Whether the user should verify his identity by entering his 2FA SRP parameters to the messages.getBotCallbackAnswer method. NOTE: telegram and the bot WILL NOT have access to the plaintext password, thanks to SRP. This button is mainly used by the official @botfather bot, for verifying the user's identity before transferring ownership of a bot to another user.", + "style": "", "text": "Button text" } }, @@ -3909,18 +4249,24 @@ "desc": "Clipboard button: when clicked, the attached text must be copied to the clipboard.", "params": { "copy_text": "The text that will be copied to the clipboard", + "flags": "Flags, see TL conditional fields", + "style": "", "text": "Title of the button" } }, "KeyboardButtonGame": { "desc": "Button to start a game", "params": { + "flags": "Flags, see TL conditional fields", + "style": "", "text": "Button text" } }, "KeyboardButtonRequestGeoLocation": { "desc": "Button to request a user's geolocation", "params": { + "flags": "Flags, see TL conditional fields", + "style": "", "text": "Button text" } }, @@ -3928,14 +4274,18 @@ "desc": "Prompts the user to select and share one or more peers with the bot using messages.sendBotRequestedPeer", "params": { "button_id": "Button ID, to be passed to messages.sendBotRequestedPeer.", + "flags": "Flags, see TL conditional fields", "max_quantity": "Maximum number of peers that can be chosen.", "peer_type": "Filtering criteria to use for the peer selection list shown to the user. The list should display all existing peers of the specified type, and should also offer an option for the user to create and immediately use one or more (up to max_quantity) peers of the specified type, if needed.", + "style": "", "text": "Button text" } }, "KeyboardButtonRequestPhone": { "desc": "Button to request a user's phone number", "params": { + "flags": "Flags, see TL conditional fields", + "style": "", "text": "Button text" } }, @@ -3944,6 +4294,7 @@ "params": { "flags": "Flags, see TL conditional fields", "quiz": "If set, only quiz polls can be sent", + "style": "", "text": "Button text" } }, @@ -3956,10 +4307,22 @@ "KeyboardButtonSimpleWebView": { "desc": "Button to open a bot mini app using messages.requestSimpleWebView, without sending user information to the web app.", "params": { + "flags": "Flags, see TL conditional fields", + "style": "", "text": "Button text", "url": "Web app URL" } }, + "KeyboardButtonStyle": { + "desc": "{schema}", + "params": { + "bg_danger": "", + "bg_primary": "", + "bg_success": "", + "flags": "Flags, see TL conditional fields", + "icon": "" + } + }, "KeyboardButtonSwitchInline": { "desc": "Button to force a user to switch to inline mode: pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field.", "params": { @@ -3967,12 +4330,15 @@ "peer_types": "Filter to use when selecting chats.", "query": "The inline query to use", "same_peer": "If set, pressing the button will insert the bot's username and the specified inline query in the current chat's input field.", + "style": "", "text": "Button label" } }, "KeyboardButtonUrl": { "desc": "URL button", "params": { + "flags": "Flags, see TL conditional fields", + "style": "", "text": "Button label", "url": "URL" } @@ -3983,6 +4349,7 @@ "button_id": "ID of the button to pass to messages.requestUrlAuth", "flags": "Flags, see TL conditional fields", "fwd_text": "New text of the button in forwarded messages.", + "style": "", "text": "Button label", "url": "An HTTP URL to be opened with user authorization data added to the query string when the button is pressed. If the user refuses to provide authorization data, the original URL without information about the user will be opened. The data added is the same as described in Receiving authorization data.NOTE: Services must always check the hash of the received data to verify the authentication and the integrity of the data as described in Checking authorization." } @@ -3990,6 +4357,8 @@ "KeyboardButtonUserProfile": { "desc": "Button that links directly to a user profile", "params": { + "flags": "Flags, see TL conditional fields", + "style": "", "text": "Button text", "user_id": "User ID" } @@ -3997,6 +4366,8 @@ "KeyboardButtonWebView": { "desc": "Button to open a bot mini app using messages.requestWebView, sending over user information after user confirmation.", "params": { + "flags": "Flags, see TL conditional fields", + "style": "", "text": "Button text", "url": "Web app url" } @@ -4078,7 +4449,7 @@ } }, "MediaAreaCoordinates": { - "desc": "Coordinates and size of a clicable rectangular area on top of a story.", + "desc": "Coordinates and size of a clickable rectangular area on top of a story.", "params": { "flags": "Flags, see TL conditional fields", "h": "The height of the rectangle, as a percentage of the media height (0-100).", @@ -4099,8 +4470,11 @@ } }, "MediaAreaStarGift": { - "desc": "", - "params": {} + "desc": "Represents a collectible gift \u00bb.", + "params": { + "coordinates": "Coordinates of the media area.", + "slug": "slug from starGiftUnique.slug, that can be resolved as specified here \u00bb." + } }, "MediaAreaSuggestedReaction": { "desc": "Represents a reaction bubble.", @@ -4154,6 +4528,7 @@ "forwards": "Forward counter", "from_boosts_applied": "Supergroups only, contains the number of boosts this user has given the current supergroup, and should be shown in the UI in the header of the message. Only present for incoming messages from non-anonymous supergroup members that have boosted the supergroup. Note that this counter should be locally overridden for non-anonymous outgoing messages, according to the current value of channelFull.boosts_applied, to ensure the value is correct even for messages sent by the current user before a supergroup was boosted (or after a boost has expired or the number of boosts has changed); do not update this value for incoming messages from other users, even if their boosts have changed.", "from_id": "ID of the sender of the message", + "from_rank": "", "from_scheduled": "Whether this is a scheduled message", "fwd_from": "Info about forwarded messages", "grouped_id": "Multiple media messages sent using messages.sendMultiMedia with the same grouped ID indicate an album or media group", @@ -4167,6 +4542,9 @@ "noforwards": "Whether this message is protected and thus cannot be forwarded; clients should also prevent users from saving attached media (i.e. videos should only be streamed, photos should be kept in RAM, et cetera).", "offline": "If set, the message was sent because of a scheduled action by the message sender, for example, as away, or a greeting service message.", "out": "Is this an outgoing message", + "paid_message_stars": "The amount of stars the sender has paid to send the message, see here \u00bb for more info.", + "paid_suggested_post_stars": "Set if this is a suggested channel post \u00bb that was paid using Telegram Stars.", + "paid_suggested_post_ton": "Set if this is a suggested channel post \u00bb that was paid using Toncoins.", "peer_id": "Peer ID, the chat where this message was sent", "pinned": "Whether this message is pinned", "post": "Whether this is a channel post", @@ -4176,9 +4554,13 @@ "replies": "Info about post comments (for channels) or message replies (for groups)", "reply_markup": "Reply markup (bot/inline keyboards)", "reply_to": "Reply information", + "report_delivery_until_date": "Used for Telegram Gateway verification messages: if set and the current unixtime is bigger than the specified unixtime, invoke messages.reportMessagesDelivery passing the ID and the peer of this message as soon as it is received by the client (optionally batching requests for the same peer).", "restriction_reason": "Contains the reason why access to this message must be restricted.", - "saved_peer_id": "Messages fetched from a saved messages dialog \u00bb will have peer=inputPeerSelf and the saved_peer_id flag set to the ID of the saved dialog.", + "saved_peer_id": "Messages from a saved messages dialog \u00bb will have peer=inputPeerSelf and the saved_peer_id flag set to the ID of the saved dialog.Messages from a monoforum \u00bb will have peer=ID of the monoforum and the saved_peer_id flag set to the ID of a topic.", + "schedule_repeat_period": "", "silent": "Whether this is a silent message (no notification triggered)", + "suggested_post": "Used to suggest a post to a channel, see here \u00bb for more info on the full flow.", + "summary_from_language": "", "ttl_period": "Time To Live of the message, once message.date+message.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well.", "via_bot_id": "ID of the inline bot that generated the message", "via_business_bot_id": "Whether the message was sent by the business bot specified in via_bot_id on behalf of the user.", @@ -4202,6 +4584,12 @@ "from_request": "We have allowed the bot to send us messages using bots.allowSendMessage \u00bb." } }, + "MessageActionChangeCreator": { + "desc": "{schema}", + "params": { + "new_creator_id": "" + } + }, "MessageActionChannelCreate": { "desc": "The channel was created", "params": { @@ -4266,6 +4654,18 @@ "channel_id": "The supergroup it was migrated to" } }, + "MessageActionConferenceCall": { + "desc": "Represents a conference call (or an invitation to a conference call, if neither the missed nor active flags are set).", + "params": { + "active": "Whether the user is currently in the conference call.", + "call_id": "Call ID.", + "duration": "Call duration, for left calls only.", + "flags": "Flags, see TL conditional fields", + "missed": "Whether the conference call has ended and the user hasn't joined.", + "other_participants": "Identifiers of some other call participants.", + "video": "Whether this is a video conference call." + } + }, "MessageActionContactSignUp": { "desc": "A contact just signed up to telegram", "params": {} @@ -4303,9 +4703,9 @@ "crypto_amount": "If crypto_currency is set, contains the paid amount, in the smallest units of the cryptocurrency.", "crypto_currency": "If set, the gift was made using the specified cryptocurrency.", "currency": "Three-letter ISO 4217 currency code", + "days": "", "flags": "Flags, see TL conditional fields", "message": "Message attached with the gift", - "months": "Duration in months of the gifted Telegram Premium subscription.", "slug": "Slug of the Telegram Premium giftcode link", "unclaimed": "If set, the link was not redeemed yet.", "via_giveaway": "If set, this gift code was received from a giveaway \u00bb started by a channel/supergroup we're subscribed to." @@ -4318,9 +4718,9 @@ "crypto_amount": "If the gift was bought using a cryptocurrency, price of the gift in the smallest units of a cryptocurrency.", "crypto_currency": "If the gift was bought using a cryptocurrency, the cryptocurrency name.", "currency": "Three-letter ISO 4217 currency code", + "days": "", "flags": "Flags, see TL conditional fields", - "message": "Message attached with the gift", - "months": "Duration of the gifted Telegram Premium subscription" + "message": "Message attached with the gift" } }, "MessageActionGiftStars": { @@ -4335,6 +4735,17 @@ "transaction_id": "Identifier of the transaction, only visible to the receiver of the gift." } }, + "MessageActionGiftTon": { + "desc": "You were gifted some toncoins.", + "params": { + "amount": "FIAT currency equivalent (in the currency specified in currency) of the amount specified in crypto_amount.", + "crypto_amount": "Amount in the smallest unit of the cryptocurrency (for TONs, one billionth of a ton, AKA a nanoton).", + "crypto_currency": "Name of the cryptocurrency.", + "currency": "Name of a localized FIAT currency.", + "flags": "Flags, see TL conditional fields", + "transaction_id": "Transaction ID." + } + }, "MessageActionGiveawayLaunch": { "desc": "A giveaway was started.", "params": { @@ -4377,13 +4788,42 @@ "users": "The invited users" } }, + "MessageActionNewCreatorPending": { + "desc": "{schema}", + "params": { + "new_creator_id": "" + } + }, + "MessageActionNoForwardsRequest": { + "desc": "{schema}", + "params": { + "expired": "", + "flags": "Flags, see TL conditional fields", + "new_value": "", + "prev_value": "" + } + }, + "MessageActionNoForwardsToggle": { + "desc": "{schema}", + "params": { + "new_value": "", + "prev_value": "" + } + }, "MessageActionPaidMessagesPrice": { - "desc": "", - "params": {} + "desc": "The price of paid messages \u00bb in this chat was changed.", + "params": { + "broadcast_messages_allowed": "Can only be set for channels, if set indicates that direct messages were enabled \u00bb, otherwise indicates that direct messages were disabled; the price of paid messages is related to the price of direct messages (aka those sent to the associated monoforum).", + "flags": "Flags, see TL conditional fields", + "stars": "The new price in Telegram Stars, can be 0 if messages are now free." + } }, "MessageActionPaidMessagesRefunded": { - "desc": "", - "params": {} + "desc": "Sent from peer A to B, indicates that A refunded all stars B previously paid to send messages to A, see here \u00bb for more info on paid messages.", + "params": { + "count": "Number of paid messages affected by the refund.", + "stars": "Number of refunded stars." + } }, "MessageActionPaymentRefunded": { "desc": "Describes a payment refund (service message received by both users and bots).", @@ -4482,7 +4922,7 @@ "MessageActionSetChatTheme": { "desc": "The chat theme was changed", "params": { - "emoticon": "The emoji that identifies a chat theme" + "theme": "The new chat theme." } }, "MessageActionSetChatWallPaper": { @@ -4505,18 +4945,80 @@ "MessageActionStarGift": { "desc": "You received a gift, see here \u00bb for more info.", "params": { + "auction_acquired": "", + "can_upgrade": "If set, this gift can be upgraded to a collectible gift; can only be set for the receiver of a gift.", "convert_stars": "The receiver of this gift may convert it to this many Telegram Stars, instead of displaying it on their profile page.convert_stars will be equal to stars only if the gift was bought using recently bought Telegram Stars, otherwise it will be less than stars.", "converted": "Whether this gift was converted to Telegram Stars and cannot be displayed on the profile anymore.", "flags": "Flags, see TL conditional fields", + "from_id": "Sender of the gift (unset for anonymous gifts).", "gift": "Info about the gift", + "gift_msg_id": "For separate upgrades, the identifier of the message with the gift whose upgrade was prepaid (only valid for the receiver of the service message).", + "gift_num": "", "message": "Additional message from the sender of the gift", "name_hidden": "If set, the name of the sender of the gift will be hidden if the destination user decides to display the gift on their profile", - "saved": "Whether this gift was added to the destination user's profile (may be toggled using payments.saveStarGift and fetched using payments.getUserStarGifts)" + "peer": "Receiver of the gift.", + "prepaid_upgrade": "The sender has already pre-paid for the upgrade of this gift to a collectible gift.", + "prepaid_upgrade_hash": "Hash to prepay for a gift upgrade separately \u00bb.", + "refunded": "This gift is not available anymore because a request to refund the payment related to this gift was made, and the money was returned.", + "saved": "Whether this gift was added to the destination user's profile (may be toggled using payments.saveStarGift and fetched using payments.getSavedStarGifts)", + "saved_id": "For channel gifts, ID to use in inputSavedStarGiftChat constructors.", + "to_id": "", + "upgrade_msg_id": "If set, this gift was upgraded to a collectible gift, and the corresponding messageActionStarGiftUnique is available at the specified message ID.", + "upgrade_separate": "This service message is the notification of a separate pre-payment for the upgrade of a gift we own.", + "upgrade_stars": "The number of Telegram Stars the user can pay to convert the gift into a collectible gift \u00bb.", + "upgraded": "This gift was upgraded to a collectible gift \u00bb." + } + }, + "MessageActionStarGiftPurchaseOffer": { + "desc": "{schema}", + "params": { + "accepted": "", + "declined": "", + "expires_at": "", + "flags": "Flags, see TL conditional fields", + "gift": "", + "price": "" + } + }, + "MessageActionStarGiftPurchaseOfferDeclined": { + "desc": "{schema}", + "params": { + "expired": "", + "flags": "Flags, see TL conditional fields", + "gift": "", + "price": "" } }, "MessageActionStarGiftUnique": { - "desc": "", - "params": {} + "desc": "A gift \u00bb was upgraded to a collectible gift \u00bb.", + "params": { + "assigned": "", + "can_craft_at": "", + "can_export_at": "If set, indicates that the current gift can't be exported to the TON blockchain \u00bb yet: the owner will be able to export it at the specified unixtime.", + "can_resell_at": "If set, indicates that the current gift can't be resold \u00bb yet: the owner will be able to put it up for sale at the specified unixtime.", + "can_transfer_at": "If set, indicates that the current gift can't be transferred \u00bb yet: the owner will be able to transfer it at the specified unixtime.", + "craft": "", + "drop_original_details_stars": "", + "flags": "Flags, see TL conditional fields", + "from_id": "Sender of the gift (unset for anonymous gifts).", + "from_offer": "", + "gift": "The collectible gift.", + "peer": "Receiver of the gift.", + "prepaid_upgrade": "The sender has pre-paid for the upgrade of this gift to a collectible gift.", + "refunded": "This gift was upgraded to a collectible gift \u00bb and then re-downgraded to a regular gift because a request to refund the payment related to the upgrade was made, and the money was returned.", + "resale_amount": "Resale price of the gift.", + "saved": "If set, this gift is visible on the user or channel's profile page; can only be set for the receiver of a gift.", + "saved_id": "For channel gifts, ID to use in inputSavedStarGiftChat constructors.", + "transfer_stars": "If set, indicates that the gift can be transferred \u00bb to another user by paying the specified amount of stars.", + "transferred": "If set, this collectible was transferred (either to the current user or by the current user to the other user in the private chat, depending on the out flag of the containing messageService).", + "upgrade": "If set, this collectible was upgraded \u00bb to a collectible gift from a previously received or sent (depending on the out flag of the containing messageService) non-collectible gift." + } + }, + "MessageActionSuggestBirthday": { + "desc": "{schema}", + "params": { + "birthday": "" + } }, "MessageActionSuggestProfilePhoto": { "desc": "A new profile picture was suggested using photos.uploadContactProfilePhoto.", @@ -4524,13 +5026,51 @@ "photo": "The photo that the user suggested we set as profile picture." } }, + "MessageActionSuggestedPostApproval": { + "desc": "A suggested post \u00bb was approved or rejected.", + "params": { + "balance_too_low": "If set, the post was approved but the user's balance is too low to pay for the suggested post.", + "flags": "Flags, see TL conditional fields", + "price": "Price for the suggested post.", + "reject_comment": "If the suggested post was rejected, can optionally contain a rejection comment.", + "rejected": "Whether the suggested post was rejected.", + "schedule_date": "Scheduling date." + } + }, + "MessageActionSuggestedPostRefund": { + "desc": "A suggested post \u00bb was accepted and posted or scheduled, but either the channel deleted the posted/scheduled post before stars_suggested_post_age_min seconds have elapsed, or the user refunded the payment for the stars used to pay for the suggested post.", + "params": { + "flags": "Flags, see TL conditional fields", + "payer_initiated": "If set, the user refunded the payment for the stars used to pay for the suggested post." + } + }, + "MessageActionSuggestedPostSuccess": { + "desc": "A suggested post \u00bb was successfully posted, and payment for it was successfully received.", + "params": { + "price": "The price." + } + }, + "MessageActionTodoAppendTasks": { + "desc": "Items were appended to the todo list \u00bb.", + "params": { + "list": "Appended items." + } + }, + "MessageActionTodoCompletions": { + "desc": "Items were marked as completed or not completed in a todo list \u00bb.", + "params": { + "completed": "Items marked as completed.", + "incompleted": "Items marked as not completed." + } + }, "MessageActionTopicCreate": { "desc": "A forum topic was created.", "params": { "flags": "Flags, see TL conditional fields", "icon_color": "If no custom emoji icon is specified, specifies the color of the fallback topic icon (RGB), one of 0x6FB9F0, 0xFFD67E, 0xCB86DB, 0x8EEE98, 0xFF93B2, or 0xFB6F5F.", "icon_emoji_id": "ID of the custom emoji used as topic icon.", - "title": "Topic name." + "title": "Topic name.", + "title_missing": "" } }, "MessageActionTopicEdit": { @@ -4623,6 +5163,21 @@ "offset": "Offset of message entity within message (in UTF-16 code units)" } }, + "MessageEntityFormattedDate": { + "desc": "{schema}", + "params": { + "date": "", + "day_of_week": "", + "flags": "Flags, see TL conditional fields", + "length": "", + "long_date": "", + "long_time": "", + "offset": "", + "relative": "", + "short_date": "", + "short_time": "" + } + }, "MessageEntityHashtag": { "desc": "#hashtag message entity", "params": { @@ -4759,6 +5314,8 @@ "desc": "Dice-based animated sticker", "params": { "emoticon": "The emoji, for now , and are supported", + "flags": "Flags, see TL conditional fields", + "game_outcome": "", "value": "Dice value" } }, @@ -4773,6 +5330,8 @@ "spoiler": "Whether this media should be hidden behind a spoiler warning", "ttl_seconds": "Time to live of self-destructing document", "video": "Whether this is a video.", + "video_cover": "Custom video cover.", + "video_timestamp": "Start playing the video at the specified timestamp (seconds).", "voice": "Whether this is a voice message." } }, @@ -4884,7 +5443,15 @@ "via_mention": "If set, indicates that this someone has mentioned us in this story (i.e. by tagging us in the description) or vice versa, we have mentioned the other peer (if the message is outgoing)." } }, - "MessageMediaUnsupported": { + "MessageMediaToDo": { + "desc": "Represents a todo list \u00bb.", + "params": { + "completions": "Completed items.", + "flags": "Flags, see TL conditional fields", + "todo": "The todo list." + } + }, + "MessageMediaUnsupported": { "desc": "Current version of the client does not support this media type.", "params": {} }, @@ -4899,6 +5466,14 @@ "venue_type": "Venue type in the provider's database" } }, + "MessageMediaVideoStream": { + "desc": "{schema}", + "params": { + "call": "", + "flags": "Flags, see TL conditional fields", + "rtmp_stream": "" + } + }, "MessageMediaWebPage": { "desc": "Preview of webpage", "params": { @@ -4976,7 +5551,7 @@ } }, "MessageReplies": { - "desc": "Info about the comment section of a channel post, or a simple message thread", + "desc": "Info about the comment section of a channel post, a simple message thread, a forum topic, or a direct messages topic (all features ultimately based on message threads).", "params": { "channel_id": "For channel post comments, contains the ID of the associated discussion supergroup", "comments": "Whether this constructor contains information about the comment section of a channel post, or a simple message thread", @@ -5002,7 +5577,8 @@ "reply_to_msg_id": "ID of message to which this message is replying", "reply_to_peer_id": "For replies sent in channel discussion threads of which the current user is not a member, the discussion group ID", "reply_to_scheduled": "This is a reply to a scheduled message.", - "reply_to_top_id": "ID of the message that started this message thread" + "reply_to_top_id": "ID of the message that started this message thread", + "todo_item_id": "Can be set to reply to the specified item of a todo list \u00bb." } }, "MessageReplyStoryHeader": { @@ -5033,7 +5609,10 @@ "out": "Whether the message is outgoing", "peer_id": "Sender of service message", "post": "Whether it's a channel post", + "reactions": "Reactions \u00bb.", + "reactions_are_possible": "Whether you can react to this message \u00bb.", "reply_to": "Reply (thread) information", + "saved_peer_id": "Will only be set for service messages within a monoforum topic \u00bb: peer will be equal to the ID of the monoforum and the saved_peer_id flag will be set to the ID of a topic.", "silent": "Whether the message is silent", "ttl_period": "Time To Live of the message, once message.date+message.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well." } @@ -5056,6 +5635,21 @@ "user_id": "ID of the user. If neither of the flags below are set, we could not add the user because of their privacy settings, and we can create and directly share an invite link with them using a normal message, instead." } }, + "MonoForumDialog": { + "desc": "Represents a monoforum topic \u00bb.", + "params": { + "draft": "A pending message draft.", + "flags": "Flags, see TL conditional fields", + "nopaid_messages_exception": "If set, an admin has exempted this peer from payment to send messages using account.toggleNoPaidMessagesException.", + "peer": "The peer associated to the topic, AKA the topic ID.", + "read_inbox_max_id": "Position up to which all incoming messages are read.", + "read_outbox_max_id": "Position up to which all outgoing messages are read.", + "top_message": "The latest message ID", + "unread_count": "Number of unread messages.", + "unread_mark": "Whether this topic has a manually set (with messages.markDialogUnread) unread mark.", + "unread_reactions_count": "Number of unread reactions." + } + }, "MyBoost": { "desc": "Contains information about a single boost slot \u00bb.", "params": { @@ -5419,16 +6013,29 @@ } }, "PaidReactionPrivacyAnonymous": { - "desc": "", + "desc": "Send paid reactions anonymously.", "params": {} }, "PaidReactionPrivacyDefault": { - "desc": "", + "desc": "Uses the default reaction privacy, set using messages.togglePaidReactionPrivacy.", "params": {} }, "PaidReactionPrivacyPeer": { - "desc": "", - "params": {} + "desc": "Send paid reactions as the specified peer, fetched using channels.getSendAs.", + "params": { + "peer": "The peer to send reactions as." + } + }, + "Passkey": { + "desc": "{schema}", + "params": { + "date": "", + "flags": "Flags, see TL conditional fields", + "id": "", + "last_usage_date": "", + "name": "", + "software_emoji_id": "" + } }, "PasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow": { "desc": "This key derivation algorithm defines that SRP 2FA login must be used", @@ -5501,6 +6108,19 @@ "flags": "Flags, see TL conditional fields" } }, + "PeerColorCollectible": { + "desc": "{schema}", + "params": { + "accent_color": "", + "background_emoji_id": "", + "collectible_id": "", + "colors": "", + "dark_accent_color": "", + "dark_colors": "", + "flags": "Flags, see TL conditional fields", + "gift_emoji_id": "" + } + }, "PeerLocated": { "desc": "Peer geolocated nearby", "params": { @@ -5542,10 +6162,15 @@ "business_bot_id": "Contains the ID of the business bot \u00bb managing this chat, used to display info about the bot in the action bar.", "business_bot_manage_url": "Contains a deep link \u00bb, used to open a management menu in the business bot. This flag is set if and only if business_bot_id is set.", "business_bot_paused": "This flag is set if both business_bot_id and business_bot_manage_url are set and all connected business bots \u00bb were paused in this chat using account.toggleConnectedBotPaused \u00bb.", + "charge_paid_message_stars": "All users that must pay us \u00bb to send us private messages will have this flag set only for us, containing the amount of required stars, see here \u00bb for more info on paid messages.", "flags": "Flags, see TL conditional fields", "geo_distance": "Distance in meters between us and this peer", "invite_members": "If set, this is a recently created group chat to which new members can be invited", + "name_change_date": "When was the user's name last changed.", "need_contacts_exception": "Whether a special exception for contacts is needed", + "phone_country": "The country code of the user's phone number.", + "photo_change_date": "When was the user's photo last changed.", + "registration_month": "Used to display the user's registration year and month, the string is in MM.YYYY format, where MM is the registration month (1-12), and YYYY is the registration year.", "report_geo": "Whether we can report a geogroup as irrelevant for this location", "report_spam": "Whether we can still report the user for spam", "request_chat_broadcast": "This flag is set if request_chat_title and request_chat_date fields are set and the join request \u00bb is related to a channel (otherwise if only the request fields are set, the join request \u00bb is related to a chat).", @@ -5569,11 +6194,21 @@ "user_id": "User identifier" } }, + "PendingSuggestion": { + "desc": "Represents a custom pending suggestion \u00bb.", + "params": { + "description": "Body of the suggestion.", + "suggestion": "The suggestion ID, can be passed to help.dismissSuggestion.", + "title": "Title of the suggestion.", + "url": "URL to open when the user clicks on the suggestion." + } + }, "PhoneCall": { "desc": "Phone call", "params": { "access_hash": "Access hash", "admin_id": "User ID of the creator of the call", + "conference_supported": "If set, the other party supports upgrading of the call to a conference call.", "connections": "List of endpoints the user can connect to exchange call data", "custom_parameters": "Custom JSON-encoded call parameters to be passed to tgcalls.", "date": "Date of creation of the call", @@ -5602,10 +6237,6 @@ "video": "Whether this is a video call" } }, - "PhoneCallDiscardReasonAllowGroupCall": { - "desc": "", - "params": {} - }, "PhoneCallDiscardReasonBusy": { "desc": "The phone call was discarded because the user is busy in another call", "params": {} @@ -5618,6 +6249,12 @@ "desc": "The phone call was ended normally", "params": {} }, + "PhoneCallDiscardReasonMigrateConferenceCall": { + "desc": "This phone call was migrated to a conference call.", + "params": { + "slug": "Conference link \u00bb slug." + } + }, "PhoneCallDiscardReasonMissed": { "desc": "The phone call was missed", "params": {} @@ -5775,7 +6412,7 @@ "Poll": { "desc": "Poll", "params": { - "answers": "The possible answers, vote using messages.sendVote.", + "answers": "The possible answers (2-poll_answers_max), vote using messages.sendVote.", "close_date": "Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future; can't be used together with close_period.", "close_period": "Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with close_date.", "closed": "Whether the poll is closed and doesn't accept any more answers", @@ -5918,7 +6555,7 @@ "params": {} }, "PrivacyKeyNoPaidMessages": { - "desc": "", + "desc": "Who can send you messages without paying, if paid messages \u00bb are enabled.", "params": {} }, "PrivacyKeyPhoneCall": { @@ -5937,6 +6574,10 @@ "desc": "Whether the profile picture of the user is visible", "params": {} }, + "PrivacyKeySavedMusic": { + "desc": "{schema}", + "params": {} + }, "PrivacyKeyStarGiftsAutoSave": { "desc": "Whether received gifts will be automatically displayed on our profile", "params": {} @@ -5960,7 +6601,7 @@ "PrivacyValueAllowChatParticipants": { "desc": "Allow all participants of certain chats", "params": { - "chats": "Allowed chats" + "chats": "Allowed chat IDs (either a chat or a supergroup ID, verbatim the way it is received in the constructor (i.e. unlike with bot API IDs, here group and supergroup IDs should be treated in the same way))." } }, "PrivacyValueAllowCloseFriends": { @@ -5992,7 +6633,7 @@ "PrivacyValueDisallowChatParticipants": { "desc": "Disallow only participants of certain chats", "params": { - "chats": "Disallowed chats" + "chats": "Disallowed chats IDs (either a chat or a supergroup ID, verbatim the way it is received in the constructor (i.e. unlike with bot API IDs, here group and supergroup IDs should be treated in the same way))." } }, "PrivacyValueDisallowContacts": { @@ -6005,6 +6646,38 @@ "users": "Disallowed users" } }, + "ProfileTabFiles": { + "desc": "Represents the shared files tab of a profile.", + "params": {} + }, + "ProfileTabGifs": { + "desc": "Represents the gifs tab of a profile page.", + "params": {} + }, + "ProfileTabGifts": { + "desc": "Represents the gifts tab of a profile page.", + "params": {} + }, + "ProfileTabLinks": { + "desc": "Represents the shared links tab of a profile page.", + "params": {} + }, + "ProfileTabMedia": { + "desc": "Represents the media tab of a profile page.", + "params": {} + }, + "ProfileTabMusic": { + "desc": "Represents the music tab of a profile page.", + "params": {} + }, + "ProfileTabPosts": { + "desc": "Represents the stories tab of a profile page.", + "params": {} + }, + "ProfileTabVoice": { + "desc": "Represents the voice messages tab of a profile page.", + "params": {} + }, "PublicForwardMessage": { "desc": "Contains info about a forward of a story as a message.", "params": { @@ -6122,6 +6795,14 @@ "user_id": "User ID" } }, + "RecentStory": { + "desc": "{schema}", + "params": { + "flags": "Flags, see TL conditional fields", + "live": "", + "max_id": "" + } + }, "ReplyInlineMarkup": { "desc": "Bot or inline keyboard", "params": { @@ -6236,15 +6917,17 @@ } }, "RequirementToContactEmpty": { - "desc": "", + "desc": "This user can be freely contacted.", "params": {} }, "RequirementToContactPaidMessages": { - "desc": "", - "params": {} + "desc": "This user requires us to pay the specified amount of Telegram Stars to send them a message, see here \u00bb for the full flow.", + "params": { + "stars_amount": "The required amount of Telegram Stars." + } }, "RequirementToContactPremium": { - "desc": "", + "desc": "This user requires us to buy a Premium subscription in order to contact them.", "params": {} }, "RestrictionReason": { @@ -6283,8 +6966,44 @@ } }, "SavedStarGift": { - "desc": "", - "params": {} + "desc": "Represents a gift owned by a peer.", + "params": { + "can_craft_at": "", + "can_export_at": "If set, indicates that the current gift can't be exported to the TON blockchain \u00bb yet: the owner will be able to export it at the specified unixtime.", + "can_resell_at": "If set, indicates that the current gift can't be resold \u00bb yet: the owner will be able to put it up for sale at the specified unixtime.", + "can_transfer_at": "If set, indicates that the current gift can't be transferred \u00bb yet: the owner will be able to transfer it at the specified unixtime.", + "can_upgrade": "Only set for non-collectible gifts, if they can be upgraded to a collectible gift \u00bb.", + "collection_id": "IDs of the collections \u00bb that this gift is a part of.", + "convert_stars": "For non-collectible gifts, the receiver of this gift may convert it to this many Telegram Stars, instead of displaying it on their profile page.", + "date": "Reception date of the gift.", + "drop_original_details_stars": "", + "flags": "Flags, see TL conditional fields", + "from_id": "Sender of the gift (unset for anonymous gifts).", + "gift": "The collectible gift.", + "gift_num": "", + "message": "Message attached to the gift.", + "msg_id": "For gifts received by users, ID to use in inputSavedStarGiftUser constructors.", + "name_hidden": "If set, the gift sender in from_id and the message are set only for the receiver of the gift.", + "pinned_to_top": "Whether this gift is pinned on top of the user's profile page.", + "prepaid_upgrade_hash": "Hash to prepay for a gift upgrade separately \u00bb.", + "refunded": "This gift was upgraded to a collectible gift \u00bb and then re-downgraded to a regular gift because a request to refund the payment related to the upgrade was made, and the money was returned.", + "saved_id": "For gifts received by channels, ID to use in inputSavedStarGiftChat constructors.", + "transfer_stars": "If set, indicates that the gift can be transferred \u00bb to another user by paying the specified amount of stars.", + "unsaved": "If set, the gift is not pinned on the user's profile.", + "upgrade_separate": "If set, someone already separately pre-paid for the upgrade of this gift.", + "upgrade_stars": "Only for pre-paid non-collectible gifts, the number of Telegram Stars the sender has already paid to convert the gift into a collectible gift \u00bb (this is different from the meaning of the flag in messageActionStarGift, where it signals the upgrade price for not yet upgraded gifts)." + } + }, + "SearchPostsFlood": { + "desc": "Indicates if the specified global post search \u00bb requires payment.", + "params": { + "flags": "Flags, see TL conditional fields", + "query_is_free": "The specified query is free (and it will not use up free search slots).", + "remains": "Remaining number of free search slots.", + "stars_amount": "The number of Telegram Stars to pay for each non-free search.", + "total_daily": "Total number of daily free search slots.", + "wait_till": "If there are no more search slots, specifies the unixtime when more search slots will be available." + } }, "SearchResultPosition": { "desc": "Information about a message in a specific position", @@ -6594,6 +7313,13 @@ "desc": "User is recording a video.", "params": {} }, + "SendMessageTextDraftAction": { + "desc": "{schema}", + "params": { + "random_id": "", + "text": "" + } + }, "SendMessageTypingAction": { "desc": "User is typing.", "params": {} @@ -6657,8 +7383,10 @@ "color": "If set, the sponsored message should use the message accent color \u00bb specified in color.", "entities": "Message entities for styled text in message.", "flags": "Flags, see TL conditional fields", + "max_display_duration": "For sponsored messages to show on channel videos \u00bb, autohide the ad after after the specified amount of seconds.", "media": "If set, contains some media.", "message": "Sponsored message", + "min_display_duration": "For sponsored messages to show on channel videos \u00bb, allow the user to hide the ad only after the specified amount of seconds.", "photo": "If set, contains a custom profile photo bubble that should be displayed for the sponsored message, like for messages sent in groups.", "random_id": "Message ID", "recommended": "Whether the message needs to be labeled as \"recommended\" instead of \"sponsored\"", @@ -6670,51 +7398,283 @@ "SponsoredMessageReportOption": { "desc": "A report option for a sponsored message \u00bb.", "params": { - "option": "Option identifier to pass to channels.reportSponsoredMessage.", + "option": "Option identifier to pass to messages.reportSponsoredMessage.", "text": "Localized description of the option." } }, "SponsoredPeer": { - "desc": "", - "params": {} + "desc": "A sponsored peer.", + "params": { + "additional_info": "If set, contains additional information about the sponsored message to be shown along with the peer.", + "flags": "Flags, see TL conditional fields", + "peer": "The sponsored peer.", + "random_id": "ID of the sponsored peer, to be passed to messages.viewSponsoredMessage, messages.clickSponsoredMessage or messages.reportSponsoredMessage (the same methods used for sponsored messages »).", + "sponsor_info": "If set, contains additional information about the sponsor to be shown along with the peer." + } }, "StarGift": { "desc": "Represents a star gift, see here \u00bb for more info.", "params": { + "auction": "", + "auction_slug": "", + "auction_start_date": "", "availability_remains": "For limited-supply gifts: the remaining number of gifts that may be bought.", + "availability_resale": "The total number of (upgraded to collectibles) gifts of this type currently on resale", "availability_total": "For limited-supply gifts: the total number of gifts that was available in the initial supply.", + "background": "", "birthday": "Whether this is a birthday-themed gift", "convert_stars": "The receiver of this gift may convert it to this many Telegram Stars, instead of displaying it on their profile page.convert_stars will be equal to stars only if the gift was bought using recently bought Telegram Stars, otherwise it will be less than stars.", "first_sale_date": "For sold out gifts only: when was the gift first bought.", "flags": "Flags, see TL conditional fields", + "gifts_per_round": "", "id": "Identifier of the gift", "last_sale_date": "For sold out gifts only: when was the gift last bought.", "limited": "Whether this is a limited-supply gift.", + "limited_per_user": "If set, the maximum number of gifts of this type that can be owned by a single user is limited and specified in per_user_total, and the remaining slots for the current user in per_user_remains.", + "locked_until_date": "If set, the specified gift possibly cannot be sent until the specified date, see here \u00bb for the full flow.", + "peer_color_available": "", + "per_user_remains": "Remaining number of gifts of this type that can be owned by the current user.", + "per_user_total": "Maximum number of gifts of this type that can be owned by any user.", + "released_by": "This gift was released by the specified peer.", + "require_premium": "This gift can only be bought by users with a Premium subscription.", + "resell_min_stars": "The minimum price in Stars for gifts of this type currently on resale.", "sold_out": "Whether this gift sold out and cannot be bought anymore.", "stars": "Price of the gift in Telegram Stars.", - "sticker": "Sticker that represents the gift." + "sticker": "Sticker that represents the gift.", + "title": "Title of the gift", + "upgrade_stars": "The number of Telegram Stars the user can pay to convert the gift into a collectible gift \u00bb.", + "upgrade_variants": "" + } + }, + "StarGiftActiveAuctionState": { + "desc": "{schema}", + "params": { + "gift": "", + "state": "", + "user_state": "" } }, "StarGiftAttributeBackdrop": { - "desc": "", - "params": {} + "desc": "The backdrop of a collectible gift \u00bb.", + "params": { + "backdrop_id": "Unique ID of the backdrop", + "center_color": "Color of the center of the backdrop in RGB24 format.", + "edge_color": "Color of the edges of the backdrop in RGB24 format.", + "name": "Name of the backdrop", + "pattern_color": "Color of the starGiftAttributePattern applied on the backdrop in RGB24 format.", + "rarity": "", + "text_color": "Color of the text on the backdrop in RGB24 format." + } + }, + "StarGiftAttributeCounter": { + "desc": "Indicates the total number of gifts that have the specified attribute.", + "params": { + "attribute": "The attribute (just the ID, without the attribute itself).", + "count": "Total number of gifts with this attribute." + } + }, + "StarGiftAttributeIdBackdrop": { + "desc": "The ID of a backdrop of a collectible gift \u00bb.", + "params": { + "backdrop_id": "Unique ID of the backdrop." + } + }, + "StarGiftAttributeIdModel": { + "desc": "The ID of a model of a collectible gift \u00bb.", + "params": { + "document_id": "The sticker representing the upgraded gift" + } + }, + "StarGiftAttributeIdPattern": { + "desc": "The ID of a pattern of a collectible gift \u00bb.", + "params": { + "document_id": "The sticker representing the symbol" + } }, "StarGiftAttributeModel": { - "desc": "", - "params": {} + "desc": "The model of a collectible gift \u00bb.", + "params": { + "crafted": "", + "document": "The sticker representing the upgraded gift", + "flags": "Flags, see TL conditional fields", + "name": "Name of the model", + "rarity": "" + } }, "StarGiftAttributeOriginalDetails": { - "desc": "", - "params": {} + "desc": "Info about the sender, receiver and message attached to the original gift \u00bb, before it was upgraded to a collectible gift \u00bb.", + "params": { + "date": "When was the gift sent.", + "flags": "Flags, see TL conditional fields", + "message": "Original message attached to the gift, if present.", + "recipient_id": "Original receiver of the gift.", + "sender_id": "Original sender of the gift, absent if the gift was private." + } }, "StarGiftAttributePattern": { - "desc": "", + "desc": "A sticker applied on the backdrop of a collectible gift \u00bb using a repeating pattern.", + "params": { + "document": "The symbol", + "name": "Name of the symbol", + "rarity": "" + } + }, + "StarGiftAttributeRarity": { + "desc": "{schema}", + "params": { + "permille": "" + } + }, + "StarGiftAttributeRarityEpic": { + "desc": "{schema}", "params": {} }, - "StarGiftUnique": { - "desc": "", + "StarGiftAttributeRarityLegendary": { + "desc": "{schema}", + "params": {} + }, + "StarGiftAttributeRarityRare": { + "desc": "{schema}", + "params": {} + }, + "StarGiftAttributeRarityUncommon": { + "desc": "{schema}", + "params": {} + }, + "StarGiftAuctionAcquiredGift": { + "desc": "{schema}", + "params": { + "bid_amount": "", + "date": "", + "flags": "Flags, see TL conditional fields", + "gift_num": "", + "message": "", + "name_hidden": "", + "peer": "", + "pos": "", + "round": "" + } + }, + "StarGiftAuctionRound": { + "desc": "{schema}", + "params": { + "duration": "", + "num": "" + } + }, + "StarGiftAuctionRoundExtendable": { + "desc": "{schema}", + "params": { + "duration": "", + "extend_top": "", + "extend_window": "", + "num": "" + } + }, + "StarGiftAuctionState": { + "desc": "{schema}", + "params": { + "bid_levels": "", + "current_round": "", + "end_date": "", + "gifts_left": "", + "last_gift_num": "", + "min_bid_amount": "", + "next_round_at": "", + "rounds": "", + "start_date": "", + "top_bidders": "", + "total_rounds": "", + "version": "" + } + }, + "StarGiftAuctionStateFinished": { + "desc": "{schema}", + "params": { + "average_price": "", + "end_date": "", + "flags": "Flags, see TL conditional fields", + "fragment_listed_count": "", + "fragment_listed_url": "", + "listed_count": "", + "start_date": "" + } + }, + "StarGiftAuctionStateNotModified": { + "desc": "{schema}", "params": {} }, + "StarGiftAuctionUserState": { + "desc": "{schema}", + "params": { + "acquired_count": "", + "bid_amount": "", + "bid_date": "", + "bid_peer": "", + "flags": "Flags, see TL conditional fields", + "min_bid_amount": "", + "returned": "" + } + }, + "StarGiftBackground": { + "desc": "{schema}", + "params": { + "center_color": "", + "edge_color": "", + "text_color": "" + } + }, + "StarGiftCollection": { + "desc": "Represents a star gift collection \u00bb.", + "params": { + "collection_id": "The ID of the collection.", + "flags": "Flags, see TL conditional fields", + "gifts_count": "Number of gifts in the collection.", + "hash": "Field to use instead of collection_id when generating the hash to pass to payments.getStarGiftCollections.", + "icon": "Optional icon for the collection, taken from the first gift in the collection.", + "title": "Title of the collection." + } + }, + "StarGiftUnique": { + "desc": "Represents a collectible star gift, see here \u00bb for more info.", + "params": { + "attributes": "Collectible attributes", + "availability_issued": "Total number of gifts of the same type that were upgraded to a collectible gift.", + "availability_total": "Total number of gifts of the same type that can be upgraded or were already upgraded to a collectible gift.", + "burned": "", + "craft_chance_permille": "", + "crafted": "", + "flags": "Flags, see TL conditional fields", + "gift_address": "For NFTs on the TON blockchain, contains the address of the NFT (append it to the ton_blockchain_explorer_url client configuration value \u00bb to obtain a link with information about the address).", + "gift_id": "Unique ID of the gift.", + "host_id": "", + "id": "Identifier of the collectible gift.", + "num": "Unique identifier of this collectible gift among all (already upgraded) collectible gifts of the same type.", + "offer_min_stars": "", + "owner_address": "For NFTs on the TON blockchain, contains the address of the owner (append it to the ton_blockchain_explorer_url client configuration value \u00bb to obtain a link with information about the address).", + "owner_id": "The owner of the gift.", + "owner_name": "The name of the owner if neither owner_id nor owner_address are set.", + "peer_color": "", + "released_by": "This gift was released by the specified peer.", + "require_premium": "This gift can only be bought by users with a Premium subscription.", + "resale_ton_only": "Whether the gift can be bought only using Toncoins.", + "resell_amount": "Resale price of the gift.", + "slug": "Slug that can be used to create a collectible gift deep link \u00bb, or elsewhere in the API where a collectible slug is accepted.", + "theme_available": "A chat theme associated to this gift is available, see here \u00bb for more info on how to use it.", + "theme_peer": "The current chat where the associated chat theme is installed, if any (gift-based themes can only be installed in one chat at a time).", + "title": "Collectible title.", + "value_amount": "Price of the gift.", + "value_currency": "Currency for the gift's price.", + "value_usd_amount": "" + } + }, + "StarGiftUpgradePrice": { + "desc": "{schema}", + "params": { + "date": "", + "upgrade_stars": "" + } + }, "StarRefProgram": { "desc": "Indo about an affiliate program offered by a bot", "params": { @@ -6730,7 +7690,7 @@ "desc": "Describes a real (i.e. possibly decimal) amount of Telegram Stars.", "params": { "amount": "The integer amount of Telegram Stars.", - "nanos": "The decimal amount of Telegram Stars, expressed as nanostars (i.e. 1 nanostar is equal to 1/1'000'000'000th of a Telegram Star). This field may also be negative (the allowed range is -999999999 to 999999999)." + "nanos": "The decimal amount of Telegram Stars, expressed as nanostars (i.e. 1 nanostar is equal to 1/1'000'000'000th (one billionth) of a Telegram Star). This field may also be negative (the allowed range is -999999999 to 999999999)." } }, "StarsGiftOption": { @@ -6767,6 +7727,16 @@ "users": "The number of users that will be randomly chosen as winners." } }, + "StarsRating": { + "desc": "Represents the profile's star rating, see here \u00bb for more info.", + "params": { + "current_level_stars": "The numerical value of the rating required for the current level.", + "flags": "Flags, see TL conditional fields", + "level": "The current level, may be negative.", + "next_level_stars": "The numerical value of the rating required for the next level.", + "stars": "Numerical value of the current rating." + } + }, "StarsRevenueStatus": { "desc": "Describes Telegram Star revenue balances \u00bb.", "params": { @@ -6803,6 +7773,12 @@ "period": "The user should pay amount stars every period seconds to gain and maintain access to the channel. Currently the only allowed subscription period is 30*24*60*60, i.e. the user will be debited amount stars every month." } }, + "StarsTonAmount": { + "desc": "Describes an amount of toncoin in nanotons (i.e. 1/1_000_000_000 of a toncoin).", + "params": { + "amount": "The amount in nanotons." + } + }, "StarsTopupOption": { "desc": "Telegram Stars topup option.", "params": { @@ -6815,9 +7791,13 @@ } }, "StarsTransaction": { - "desc": "Represents a Telegram Stars transaction \u00bb.", + "desc": "Represents a Telegram Stars or TON transaction \u00bb.", "params": { + "ads_proceeds_from_date": "Indicates that this is payment for ad revenue from the specified unixtime (always set together with ads_proceeds_to_date).", + "ads_proceeds_to_date": "Indicates that this is payment for ad revenue to the specified unixtime.", + "amount": "Amount of Telegram Stars or TON.", "bot_payload": "Bot specified invoice payload (i.e. the payload passed to inputMediaInvoice when creating the invoice).", + "business_transfer": "This transaction transfers stars from the balance of a user account connected to a business bot, to the balance of the business bot, see here \u00bb for more info.", "date": "Date of the transaction (unixtime).", "description": "For transactions with bots, description of the bought product.", "extended_media": "The purchased paid media \u00bb.", @@ -6828,16 +7808,25 @@ "giveaway_post_id": "ID of the message containing the messageMediaGiveaway, for incoming star giveaway prizes.", "id": "Transaction ID.", "msg_id": "For paid media transactions \u00bb, message ID of the paid media posted to peer.peer (can point to a deleted message; either way, extended_media will always contain the bought media).", + "offer": "", + "paid_messages": "This transaction is related to the reception or transmission of a paid message \u00bb.", "peer": "Source of the incoming transaction, or its recipient for outgoing transactions.", "pending": "The transaction is currently pending.", + "phonegroup_message": "", "photo": "For transactions with bots, photo of the bought product.", + "posts_search": "Represents payment for a paid global post search \u00bb.", + "premium_gift_months": "This transaction indicates the payment for a gifted Telegram Premium subscription \u00bb.", "reaction": "This transaction is a paid reaction \u00bb.", "refund": "Whether this transaction is a refund.", "stargift": "This transaction indicates a purchase or a sale (conversion back to Stars) of a gift \u00bb.", + "stargift_auction_bid": "", + "stargift_drop_original_details": "", + "stargift_prepaid_upgrade": "Represents payment for a separate prepaid upgrade of a gift.", + "stargift_resale": "This transaction is related to the resale of a collectible gift \u00bb.", + "stargift_upgrade": "This transaction pays for the upgrade of a gift to a collectible gift \u00bb.", "starref_amount": "For transactions made by referred users, the amount of Telegram Stars received by the affiliate, can be negative for refunds.", "starref_commission_permille": "This transaction is the receival (or refund) of an affiliate commission (i.e. this is the transaction received by the peer that created the referral link, flag 17 is for transactions made by users that imported the referral link).", "starref_peer": "For transactions made by referred users, the peer that received the affiliate commission.", - "stars": "Amount of Stars (negative for outgoing transactions).", "subscription_period": "The number of seconds between consecutive Telegram Star debiting for Telegram Star subscriptions \u00bb.", "title": "For transactions with bots, title of the bought product.", "transaction_date": "If neither pending nor failed are set, the transaction was completed successfully, and this field will contain the point in time (Unix timestamp) when the withdrawal was completed successfully.", @@ -7024,6 +8013,16 @@ "flags": "Flags, see TL conditional fields" } }, + "StoryAlbum": { + "desc": "Represents a story album \u00bb.", + "params": { + "album_id": "ID of the album.", + "flags": "Flags, see TL conditional fields", + "icon_photo": "Photo from the first story of the album, if it's a photo.", + "icon_video": "Video from the first story of the album, if it's a video.", + "title": "Name of the album." + } + }, "StoryFwdHeader": { "desc": "Contains info about the original poster of a reposted story.", "params": { @@ -7037,6 +8036,7 @@ "StoryItem": { "desc": "Represents a story.", "params": { + "albums": "Albums this story is part of.", "caption": "Story caption.", "close_friends": "Whether this story can only be viewed by our close friends, see here \u00bb for more info", "contacts": "Whether this story can only be viewed by our contacts", @@ -7074,7 +8074,8 @@ "date": "When was the story posted.", "expire_date": "When does the story expire.", "flags": "Flags, see TL conditional fields", - "id": "Story ID" + "id": "Story ID", + "live": "" } }, "StoryReaction": { @@ -7140,6 +8141,16 @@ "views_count": "View counter of the story" } }, + "SuggestedPost": { + "desc": "Contains info about a suggested post \u00bb.", + "params": { + "accepted": "Whether the suggested post was accepted.", + "flags": "Flags, see TL conditional fields", + "price": "Price of the suggested post.", + "rejected": "Whether the suggested post was rejected.", + "schedule_date": "Scheduling date." + } + }, "TextAnchor": { "desc": "Text linking to another section of the page", "params": { @@ -7285,6 +8296,31 @@ "utc_offset": "UTC offset in seconds, which may be displayed in hh:mm format by the client together with the human-readable name (i.e. $name UTC -01:00)." } }, + "TodoCompletion": { + "desc": "A completed todo list \u00bb item.", + "params": { + "completed_by": "ID of the user that completed the item.", + "date": "When was the item completed.", + "id": "The ID of the completed item." + } + }, + "TodoItem": { + "desc": "An item of a todo list \u00bb.", + "params": { + "id": "ID of the item, a positive (non-zero) integer unique within the current list.", + "title": "Text of the item, maximum length equal to todo_item_length_max \u00bb." + } + }, + "TodoList": { + "desc": "Represents a todo list \u00bb.", + "params": { + "flags": "Flags, see TL conditional fields", + "list": "Items of the list.", + "others_can_append": "If set, users different from the creator of the list can append items to the list.", + "others_can_complete": "If set, users different from the creator of the list can complete items in the list.", + "title": "Title of the todo list, maximum length equal to todo_title_length_max \u00bb." + } + }, "TopPeer": { "desc": "Top peer", "params": { @@ -7525,13 +8561,6 @@ "timeout": "Query timeout" } }, - "UpdateBroadcastRevenueTransactions": { - "desc": "A new channel ad revenue transaction was made, see here \u00bb for more info.", - "params": { - "balances": "New ad revenue balance.", - "peer": "Channel" - } - }, "UpdateBusinessBotCallbackQuery": { "desc": "A callback button sent via a business connection was pressed, and the button data was sent to the bot that created the button.", "params": { @@ -7589,29 +8618,13 @@ "via_chatlist": "Whether the participant joined using a chat folder deep link \u00bb." } }, - "UpdateChannelPinnedTopic": { - "desc": "A forum topic \u00bb was pinned or unpinned.", - "params": { - "channel_id": "The forum ID", - "flags": "Flags, see TL conditional fields", - "pinned": "Whether the topic was pinned or unpinned", - "topic_id": "The topic ID" - } - }, - "UpdateChannelPinnedTopics": { - "desc": "The pinned topics of a forum have changed.", - "params": { - "channel_id": "Forum ID.", - "flags": "Flags, see TL conditional fields", - "order": "Ordered list containing the IDs of all pinned topics." - } - }, "UpdateChannelReadMessagesContents": { - "desc": "The specified channel/supergroup messages were read", + "desc": "The specified channel/supergroup messages were read (emitted specifically for messages like voice messages or video, only once the media is watched and marked as read using channels.readMessageContents)", "params": { "channel_id": "Channel/supergroup ID", "flags": "Flags, see TL conditional fields", "messages": "IDs of messages that were read", + "saved_peer_id": "If set, the messages were read within the specified monoforum topic \u00bb.", "top_msg_id": "Forum topic ID." } }, @@ -7704,6 +8717,15 @@ "version": "Used in basic groups to reorder updates and make sure that all of them was received." } }, + "UpdateChatParticipantRank": { + "desc": "{schema}", + "params": { + "chat_id": "", + "rank": "", + "user_id": "", + "version": "" + } + }, "UpdateChatParticipants": { "desc": "Composition of chat participants changed.", "params": { @@ -7741,6 +8763,13 @@ "pts_count": "Number of events that were generated" } }, + "UpdateDeleteGroupCallMessages": { + "desc": "{schema}", + "params": { + "call": "", + "messages": "" + } + }, "UpdateDeleteMessages": { "desc": "Messages were deleted.", "params": { @@ -7803,6 +8832,7 @@ "params": { "flags": "Flags, see TL conditional fields", "peer": "The dialog", + "saved_peer_id": "If set, the mark is related to the specified monoforum topic ID \u00bb.", "unread": "Was the chat marked or unmarked as read" } }, @@ -7812,6 +8842,7 @@ "draft": "The draft", "flags": "Flags, see TL conditional fields", "peer": "The peer to which the draft is associated", + "saved_peer_id": "If set, the draft is related to the specified monoforum topic ID \u00bb.", "top_msg_id": "ID of the forum topic to which the draft is associated" } }, @@ -7831,6 +8862,12 @@ "pts_count": "PTS count" } }, + "UpdateEmojiGameInfo": { + "desc": "{schema}", + "params": { + "info": "" + } + }, "UpdateEncryptedChatTyping": { "desc": "Interlocutor is typing a message in an encrypted chat. Update period is 6 second. If upon this time there is no repeated update, it shall be considered that the interlocutor stopped typing.", "params": { @@ -7875,7 +8912,18 @@ "desc": "A new groupcall was started", "params": { "call": "Info about the group call or livestream", - "chat_id": "The channel/supergroup where this group call or livestream takes place" + "flags": "Flags, see TL conditional fields", + "live_story": "", + "peer": "" + } + }, + "UpdateGroupCallChainBlocks": { + "desc": "Contains updates to the blockchain of a conference call, see here \u00bb for more info.", + "params": { + "blocks": "Blocks.", + "call": "The conference call.", + "next_offset": "Offset of the next block.", + "sub_chain_id": "Subchain ID." } }, "UpdateGroupCallConnection": { @@ -7886,6 +8934,21 @@ "presentation": "Are these parameters related to the screen capture session currently in progress?" } }, + "UpdateGroupCallEncryptedMessage": { + "desc": "{schema}", + "params": { + "call": "", + "encrypted_message": "", + "from_id": "" + } + }, + "UpdateGroupCallMessage": { + "desc": "{schema}", + "params": { + "call": "", + "message": "" + } + }, "UpdateGroupCallParticipants": { "desc": "The participant list of a certain group call has changed", "params": { @@ -7962,9 +9025,19 @@ "msg_id": "Message ID", "peer": "Peer", "reactions": "Reactions", + "saved_peer_id": "If set, the reactions are in the specified monoforum topic \u00bb.", "top_msg_id": "Forum topic ID" } }, + "UpdateMonoForumNoPaidException": { + "desc": "An admin has (un)exempted this monoforum topic \u00bb from payment to send messages using account.toggleNoPaidMessagesException.", + "params": { + "channel_id": "The monoforum ID.", + "exception": "If set, an admin has exempted this peer, otherwise the peer was unexempted.", + "flags": "Flags, see TL conditional fields", + "saved_peer_id": "The peer/topic ID." + } + }, "UpdateMoveStickerSetToTop": { "desc": "A stickerset was just moved to top, see here for more info \u00bb", "params": { @@ -8044,7 +9117,7 @@ "UpdatePaidReactionPrivacy": { "desc": "Contains the current default paid reaction privacy, see here \u00bb for more info.", "params": { - "private": "Whether paid reaction privacy is enabled or disabled." + "private": "Paid reaction privacy settings." } }, "UpdatePeerBlocked": { @@ -8126,6 +9199,23 @@ "order": "New order of pinned dialogs" } }, + "UpdatePinnedForumTopic": { + "desc": "{schema}", + "params": { + "flags": "Flags, see TL conditional fields", + "peer": "", + "pinned": "", + "topic_id": "" + } + }, + "UpdatePinnedForumTopics": { + "desc": "{schema}", + "params": { + "flags": "Flags, see TL conditional fields", + "order": "", + "peer": "" + } + }, "UpdatePinnedMessages": { "desc": "Some messages were pinned in a chat", "params": { @@ -8221,7 +9311,8 @@ "peer": "Peer", "pts": "Event count after generation", "pts_count": "Number of events that were generated", - "still_unread_count": "Number of messages that are still unread" + "still_unread_count": "Number of messages that are still unread", + "top_msg_id": "" } }, "UpdateReadHistoryOutbox": { @@ -8234,7 +9325,7 @@ } }, "UpdateReadMessagesContents": { - "desc": "Contents of messages in the common message box were read", + "desc": "Contents of messages in the common message box were read (emitted specifically for messages like voice messages or video, only once the media is watched and marked as read using messages.readMessageContents).", "params": { "date": "When was the last message in messages marked as read.", "flags": "Flags, see TL conditional fields", @@ -8243,6 +9334,22 @@ "pts_count": "Number of events that were generated" } }, + "UpdateReadMonoForumInbox": { + "desc": "Incoming messages in a monoforum topic were read", + "params": { + "channel_id": "ID of the monoforum.", + "read_max_id": "Position up to which all incoming messages are read.", + "saved_peer_id": "Topic ID." + } + }, + "UpdateReadMonoForumOutbox": { + "desc": "Outgoing messages in a monoforum were read.", + "params": { + "channel_id": "ID of the monoforum.", + "read_max_id": "Position up to which all outgoing messages are read.", + "saved_peer_id": "Topic ID." + } + }, "UpdateReadStories": { "desc": "Stories of a specific peer were marked as read.", "params": { @@ -8283,8 +9390,10 @@ "params": {} }, "UpdateSentPhoneCode": { - "desc": "", - "params": {} + "desc": "A paid login SMS code was successfully sent.", + "params": { + "sent_code": "Info about the sent code." + } }, "UpdateSentStoryReaction": { "desc": "Indicates we reacted to a story \u00bb.", @@ -8377,6 +9486,24 @@ "job_id": "SMS job ID" } }, + "UpdateStarGiftAuctionState": { + "desc": "{schema}", + "params": { + "gift_id": "", + "state": "" + } + }, + "UpdateStarGiftAuctionUserState": { + "desc": "{schema}", + "params": { + "gift_id": "", + "user_state": "" + } + }, + "UpdateStarGiftCraftFail": { + "desc": "{schema}", + "params": {} + }, "UpdateStarsBalance": { "desc": "The current account's Telegram Stars balance \u00bb has changed.", "params": { @@ -8484,6 +9611,8 @@ "desc": "The user is preparing a message; typing, recording, uploading, etc. This update is valid for 6 seconds. If no further updates of this kind are received after 6 seconds, it should be considered that the user stopped doing whatever they were doing", "params": { "action": "Action type", + "flags": "Flags, see TL conditional fields", + "top_msg_id": "", "user_id": "User id" } }, @@ -8529,6 +9658,7 @@ "UrlAuthResultAccepted": { "desc": "Details about an accepted authorization request, for more info click here \u00bb", "params": { + "flags": "Flags, see TL conditional fields", "url": "The URL name of the website on which the user has logged in." } }, @@ -8540,9 +9670,17 @@ "desc": "Details about the authorization request, for more info click here \u00bb", "params": { "bot": "Username of a bot, which will be used for user authorization. If not specified, the current bot's username will be assumed. The url's domain must be the same as the domain linked with the bot. See Linking your domain to the bot for more details.", + "browser": "", "domain": "The domain name of the website on which the user will log in.", "flags": "Flags, see TL conditional fields", - "request_write_access": "Whether the bot would like to send messages to the user" + "ip": "", + "match_codes": "", + "match_codes_first": "", + "platform": "", + "region": "", + "request_phone_number": "", + "request_write_access": "Whether the bot would like to send messages to the user", + "user_id_hint": "" } }, "User": { @@ -8557,22 +9695,25 @@ "bot_business": "Whether this bot can be connected to a user as specified here \u00bb.", "bot_can_edit": "Whether we can edit the profile picture, name, about text and description of this bot because we own it. When updating the local peer database, do not apply changes to this field if the min flag is set. Changes to this flag (if min is not set) should invalidate the local userFull cache for this user ID.", "bot_chat_history": "Can the bot see all messages in groups?", + "bot_forum_can_manage_topics": "", + "bot_forum_view": "", "bot_has_main_app": "If set, this bot has configured a Main Mini App \u00bb.", "bot_info_version": "Version of the bot_info field in userFull, incremented every time it changes. Changes to this flag should invalidate the local userFull cache for this user ID, see here \u00bb for more info.", "bot_inline_geo": "Whether the bot can request our geolocation in inline mode", "bot_inline_placeholder": "Inline placeholder for this inline bot", "bot_nochats": "Can the bot be added to groups?", + "bot_verification_icon": "Describes a bot verification icon \u00bb.", "close_friend": "Whether we marked this user as a close friend, see here \u00bb for more info. When updating the local peer database, do not apply changes to this field if the min flag is set.", "color": "The user's accent color.", "contact": "Whether this user is a contact When updating the local peer database, do not apply changes to this field if the min flag is set.", - "contact_require_premium": "If set, we can only write to this user if they have already sent some messages to us, if we are subscribed to Telegram Premium, or if they're a mutual contact (user.mutual_contact). All the secondary conditions listed above must be checked separately to verify whether we can still write to the user, even if this flag is set (i.e. a mutual contact will have this flag set even if we can still write to them, and so on...); to avoid doing these extra checks if we haven't yet cached all the required information (for example while displaying the chat list in the sharing UI) the users.getIsPremiumRequiredToContact method may be invoked instead, passing the list of users currently visible in the UI, returning a list of booleans that directly specify whether we can or cannot write to each user; alternatively, the userFull.contact_require_premium flag contains the same (fully checked, i.e. it's not just a copy of this flag) info returned by users.getIsPremiumRequiredToContact. To set this flag for ourselves invoke account.setGlobalPrivacySettings, setting the settings.new_noncontact_peers_require_premium flag.", + "contact_require_premium": "See here for more info on this flag \u00bb.", "deleted": "Whether the account of this user was deleted. Changes to this flag should invalidate the local userFull cache for this user ID, see here \u00bb for more info.", "emoji_status": "Emoji status", "fake": "If set, this user was reported by many users as a fake or scam user: be careful when interacting with them.", "first_name": "First name. When updating the local peer database, apply changes to this field only if: - The min flag is not set OR - The min flag is set AND -- The min flag of the locally cached user entry is set.", "flags": "Flags, see TL conditional fields", "flags2": "Flags, see TL conditional fields", - "id": "ID of the user, see here \u00bb for more info.", + "id": "ID of the user, see here \u00bb for more info and the available ID range.", "lang_code": "Language code of the user", "last_name": "Last name. When updating the local peer database, apply changes to this field only if: - The min flag is not set OR - The min flag is set AND -- The min flag of the locally cached user entry is set.", "min": "See min", @@ -8585,6 +9726,7 @@ "restriction_reason": "Contains the reason why access to this user must be restricted.", "scam": "This may be a scam user", "self": "Whether this user indicates the currently logged in user", + "send_paid_messages_stars": "If set, the user has enabled paid messages \u00bb, we might need to pay the specified amount of Stars to send them messages, depending on the configured exceptions: check userFull.send_paid_messages_stars or users.getRequirementsToContact to see if the currently logged in user actually has to pay or not, see here \u00bb for the full flow.", "status": "Online status of user. When updating the local peer database, apply changes to this field only if: - The min flag is not set OR - The min flag is set AND -- The min flag of the locally cached user entry is set OR -- The locally cached user entry is equal to userStatusEmpty.", "stories_hidden": "Whether we have hidden \u00bb all active stories of this user. When updating the local peer database, do not apply changes to this field if the min flag is set.", "stories_max_id": "ID of the maximum read story. When updating the local peer database, do not apply changes to this field if the min flag of the incoming constructor is set.", @@ -8612,6 +9754,7 @@ "bot_can_manage_emoji_status": "If set, this is a bot that can change our emoji status \u00bb", "bot_group_admin_rights": "A suggested set of administrator rights for the bot, to be shown when adding the bot as admin to a group, see here for more info on how to handle them \u00bb.", "bot_info": "For bots, info about the bot (bot commands, etc)", + "bot_verification": "Describes a bot verification icon \u00bb.", "business_away_message": "Telegram Business away message \u00bb.", "business_greeting_message": "Telegram Business greeting message \u00bb.", "business_intro": "Specifies a custom Telegram Business profile introduction \u00bb.", @@ -8621,12 +9764,18 @@ "can_view_revenue": "If set, this user can view ad revenue statistics \u00bb for this bot.", "common_chats_count": "Chats in common with this user", "contact_require_premium": "If set, we cannot write to this user: subscribe to Telegram Premium to get permission to write to this user. To set this flag for ourselves invoke account.setGlobalPrivacySettings, setting the settings.new_noncontact_peers_require_premium flag, see here \u00bb for more info.", + "disallowed_gifts": "Disallows the reception of specific gift types.", + "display_gifts_button": "If this flag is set for both us and another user (changed through globalPrivacySettings), a gift button should always be displayed in the text field in private chats with the other user: once clicked, the gift UI should be displayed, offering the user options to gift Telegram Premium \u00bb subscriptions or Telegram Gifts \u00bb.", "fallback_photo": "Fallback profile photo, displayed if no photo is present in profile_photo or personal_photo, due to privacy settings.", "flags": "Flags, see TL conditional fields", "flags2": "Flags, see TL conditional fields", "folder_id": "Peer folder ID, for more info click here", "has_scheduled": "Whether scheduled messages are available", "id": "User ID", + "main_tab": "The main tab for the user's profile, see here \u00bb for more info.", + "noforwards_my_enabled": "", + "noforwards_peer_enabled": "", + "note": "", "notify_settings": "Notification settings", "personal_channel_id": "ID of the associated personal channel \u00bb, that should be shown in the profile page.", "personal_channel_message": "ID of the latest message of the associated personal channel \u00bb, that should be previewed in the profile page.", @@ -8634,17 +9783,21 @@ "phone_calls_available": "Whether this user can make VoIP calls", "phone_calls_private": "Whether this user's privacy settings allow you to call them", "pinned_msg_id": "Message ID of the last pinned message", - "premium_gifts": "Telegram Premium subscriptions gift options", "private_forward_name": "Anonymized text to be shown instead of the user's name on forwarded messages", "profile_photo": "Profile photo", "read_dates_private": "If set, we cannot fetch the exact read date of messages we send to this user using messages.getOutboxReadDate. The exact read date of messages might still be unavailable for other reasons, see here \u00bb for more info. To set this flag for ourselves invoke account.setGlobalPrivacySettings, setting the settings.hide_read_marks flag.", + "saved_music": "The first song on the music tab of the profile, see here \u00bb for more info on the music profile tab.", + "send_paid_messages_stars": "If set and bigger than 0, this user has enabled paid messages \u00bb and we must pay the specified amount of Stars to send messages to them, see here \u00bb for the full flow. If set and equal to 0, the user requires payment in general but we were exempted from paying for any of the reasons specified in the docs \u00bb.", "settings": "Peer settings", "sponsored_enabled": "Whether ads were re-enabled for the current account (only accessible to the currently logged-in user), see here \u00bb for more info.", "stargifts_count": "Number of gifts the user has chosen to display on their profile", "starref_program": "This bot has an active referral program \u00bb", + "stars_my_pending_rating": "Our pending star rating, only visible for ourselves.", + "stars_my_pending_rating_date": "When the pending star rating will be applied, only visible for ourselves.", + "stars_rating": "The user's star rating.", "stories": "Active stories \u00bb", "stories_pinned_available": "Whether this user has some pinned stories.", - "theme_emoticon": "Emoji associated with chat theme", + "theme": "The chat theme associated with this user \u00bb.", "translations_disabled": "Whether the real-time chat translation popup should be hidden.", "ttl_period": "Time To Live of all messages in this chat; once a message is this many seconds old, it must be deleted.", "video_calls_available": "Whether the user can receive video calls", @@ -8834,8 +9987,22 @@ "photo": "Image representing the content", "site_name": "Short name of the site (e.g., Google Docs, App Store)", "title": "Title of the content", - "type": "Type of the web page. One of the following: - video- gif- photo- document- profile- telegram_background- telegram_theme- telegram_story- telegram_channel- telegram_channel_request- telegram_megagroup- telegram_chat- telegram_megagroup_request- telegram_chat_request- telegram_album- telegram_message- telegram_bot- telegram_voicechat- telegram_livestream- telegram_user- telegram_botapp- telegram_channel_boost- telegram_group_boost- telegram_giftcode- telegram_stickerset", - "url": "URL of previewed webpage" + "type": "Type of the web page. One of the following: - app- article- document- gif- photo- profile- telegram_album- telegram_auction- telegram_background- telegram_bot- telegram_botapp- telegram_call- telegram_channel- telegram_channel_boost- telegram_channel_direct- telegram_channel_request- telegram_chat- telegram_chat_request- telegram_chatlist- telegram_collection- telegram_community- telegram_giftcode- telegram_group_boost- telegram_livestream- telegram_megagroup- telegram_megagroup_request- telegram_message- telegram_nft- telegram_stickerset- telegram_story- telegram_story_album- telegram_theme- telegram_user- telegram_videochat- telegram_voicechat- video", + "url": "URL of previewed webpage", + "video_cover_photo": "Represents a custom video cover." + } + }, + "WebPageAttributeStarGiftAuction": { + "desc": "{schema}", + "params": { + "end_date": "", + "gift": "" + } + }, + "WebPageAttributeStarGiftCollection": { + "desc": "Contains info about a gift collection \u00bb for a webPage preview of a gift collection \u00bb (the webPage will have a type of telegram_collection).", + "params": { + "icons": "Gifts in the collection." } }, "WebPageAttributeStickerSet": { @@ -8865,8 +10032,10 @@ } }, "WebPageAttributeUniqueStarGift": { - "desc": "", - "params": {} + "desc": "Contains info about collectible gift \u00bb for a webPage preview of a collectible gift \u00bb (the webPage will have a type of telegram_nft).", + "params": { + "gift": "The starGiftUnique constructor." + } }, "WebPageEmpty": { "desc": "No preview is available for the webpage", @@ -8954,6 +10123,21 @@ "users": "Mentioned users" } }, + "account.ChatThemes": { + "desc": "Available chat themes", + "params": { + "chats": "Chats mentioned in the themes field.", + "flags": "Flags, see TL conditional fields", + "hash": "Hash to pass to the method that returned this constructor, to avoid refetching the result if it hasn't changed.", + "next_offset": "Next offset for pagination.", + "themes": "Themes.", + "users": "Users mentioned in the themes field." + } + }, + "account.ChatThemesNotModified": { + "desc": "The available chat themes were not modified", + "params": {} + }, "account.ConnectedBots": { "desc": "Info about currently connected business bots.", "params": { @@ -8994,8 +10178,22 @@ "params": {} }, "account.PaidMessagesRevenue": { - "desc": "", - "params": {} + "desc": "Total number of non-refunded Telegram Stars a user has spent on sending us messages either directly or through a channel, see here \u00bb for more info on paid messages.", + "params": { + "stars_amount": "Amount in Stars." + } + }, + "account.PasskeyRegistrationOptions": { + "desc": "{schema}", + "params": { + "options": "" + } + }, + "account.Passkeys": { + "desc": "{schema}", + "params": { + "passkeys": "" + } }, "account.Password": { "desc": "Configuration for two-factor authorization", @@ -9070,10 +10268,20 @@ "users": "Mentioned users" } }, - "account.SavedRingtone": { - "desc": "The notification sound was already in MP3 format and was saved without any modification", - "params": {} - }, + "account.SavedMusicIds": { + "desc": "List of IDs of songs (document.ids) currently pinned on our profile, see here \u00bb for more info.", + "params": { + "ids": "Full list of document.ids" + } + }, + "account.SavedMusicIdsNotModified": { + "desc": "The list of IDs of songs (document.ids) currently pinned on our profile hasn't changed.", + "params": {} + }, + "account.SavedRingtone": { + "desc": "The notification sound was already in MP3 format and was saved without any modification", + "params": {} + }, "account.SavedRingtoneConverted": { "desc": "The notification sound was not in MP3 format and was successfully converted and saved, use the returned Document to refer to the notification sound from now on", "params": { @@ -9145,7 +10353,7 @@ "params": { "flags": "Flags, see TL conditional fields", "future_auth_token": "A future auth token", - "otherwise_relogin_days": "Iff setup_password_required is set and the user declines to set a 2-step verification password, they will be able to log into their account via SMS again only after this many days pass.", + "otherwise_relogin_days": "If and only if setup_password_required is set and the user declines to set a 2-step verification password, they will be able to log into their account via SMS again only after this many days pass.", "setup_password_required": "Suggests the user to set up a 2-step verification password to be able to log in again", "tmp_sessions": "Temporary passport sessions", "user": "Info on authorized user" @@ -9212,6 +10420,12 @@ "authorization": "Authorization info" } }, + "auth.PasskeyLoginOptions": { + "desc": "{schema}", + "params": { + "options": "" + } + }, "auth.PasswordRecovery": { "desc": "Recovery info of a 2FA password, only for accounts with a recovery email configured.", "params": { @@ -9229,8 +10443,15 @@ } }, "auth.SentCodePaymentRequired": { - "desc": "", - "params": {} + "desc": "Official apps may receive this constructor, indicating that due to the high cost of SMS verification codes for the user's country/provider, the user must purchase a Telegram Premium subscription in order to proceed with the login/signup, see here \u00bb for more info.", + "params": { + "amount": "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).", + "currency": "Three-letter ISO 4217 currency code.", + "phone_code_hash": "Phone code hash, to be stored and later re-used with auth.signIn", + "store_product": "For official apps, tore identifier of the Telegram Premium subscription.", + "support_email_address": "An email address that can be contacted for more information about this request.", + "support_email_subject": "The mandatory subject for the email." + } }, "auth.SentCodeSuccess": { "desc": "The user successfully authorized using future auth tokens", @@ -9387,7 +10608,7 @@ "params": {} }, "channels.SponsoredMessageReportResultChooseOption": { - "desc": "The user must choose a report option from the localized options available in options, and after selection, channels.reportSponsoredMessage must be invoked again, passing the option's option field to the option param of the method.", + "desc": "The user must choose a report option from the localized options available in options, and after selection, messages.reportSponsoredMessage must be invoked again, passing the option's option field to the option param of the method.", "params": { "options": "Localized list of options.", "title": "Title of the option selection popup." @@ -9405,6 +10626,7 @@ "flags": "Flags, see TL conditional fields", "peers": "Supergroups and channels to join", "title": "Name of the link", + "title_noanimate": "If set, any animated emojis present in title should not be animated and should be instead frozen on the first frame.", "users": "Related user information" } }, @@ -9504,11 +10726,15 @@ } }, "contacts.SponsoredPeers": { - "desc": "", - "params": {} + "desc": "Sponsored peers.", + "params": { + "chats": "Info about sponsored chats and channels", + "peers": "Sponsored peers.", + "users": "Info about sponsored users" + } }, "contacts.SponsoredPeersEmpty": { - "desc": "", + "desc": "There are no sponsored peers for this query.", "params": {} }, "contacts.TopPeers": { @@ -9677,15 +10903,18 @@ } }, "help.PromoData": { - "desc": "MTProxy/Public Service Announcement information", + "desc": "A set of useful suggestions and a PSA/MTProxy sponsored peer, see here \u00bb for more info.", "params": { "chats": "Chat info", - "expires": "Expiry of PSA/MTProxy info", + "custom_pending_suggestion": "Contains a list of custom pending suggestions \u00bb.", + "dismissed_suggestions": "Contains a list of inverted suggestions \u00bb.", + "expires": "Unixtime when to re-invoke help.getPromoData.", "flags": "Flags, see TL conditional fields", "peer": "MTProxy/PSA peer", - "proxy": "MTProxy-related channel", - "psa_message": "PSA message", - "psa_type": "PSA type", + "pending_suggestions": "Contains a list of pending suggestions \u00bb.", + "proxy": "Set when connecting using an MTProxy that has configured an associated peer (that will be passed in peer, i.e. the channel that sponsored the MTProxy) that should be pinned on top of the chat list.", + "psa_message": "For Public Service Announcement peers, contains the PSA itself.", + "psa_type": "For Public Service Announcement peers, indicates the type of the PSA.", "users": "User info" } }, @@ -9989,6 +11218,29 @@ "users": "Users mentioned in constructor" } }, + "messages.EmojiGameDiceInfo": { + "desc": "{schema}", + "params": { + "current_streak": "", + "flags": "Flags, see TL conditional fields", + "game_hash": "", + "params": "", + "plays_left": "", + "prev_stake": "" + } + }, + "messages.EmojiGameOutcome": { + "desc": "{schema}", + "params": { + "seed": "", + "stake_ton_amount": "", + "ton_amount": "" + } + }, + "messages.EmojiGameUnavailable": { + "desc": "{schema}", + "params": {} + }, "messages.EmojiGroups": { "desc": "Represents a list of emoji categories.", "params": { @@ -10160,6 +11412,7 @@ "params": { "chats": "List of chats mentioned in dialogs", "messages": "List of messages", + "topics": "", "users": "List of users mentioned in messages and chats" } }, @@ -10178,7 +11431,9 @@ "inexact": "If set, indicates that the results may be inexact", "messages": "List of messages", "next_rate": "Rate to use in the offset_rate parameter in the next call to messages.searchGlobal", - "offset_id_offset": "Indicates the absolute position of messages[0] within the total result set with count count. This is useful, for example, if the result was fetched using offset_id, and we need to display a progress/total counter (like photo 134 of 200, for all media in a chat, we could simply use photo ${offset_id_offset} of ${count}.", + "offset_id_offset": "Indicates the absolute position of messages[0] within the total result set with count count. This is useful, for example, if the result was fetched using offset_id, and we need to display a progress/total counter (like photo 134 of 200, for all media in a chat, we could simply use photo ${offset_id_offset} of ${count}).", + "search_flood": "For global post searches \u00bb, the remaining amount of free searches, here query_is_free is related to the current call only, not to the next paginated call, and all subsequent pagination calls will always be free.", + "topics": "", "users": "List of users mentioned in messages and chats" } }, @@ -10233,7 +11488,7 @@ "messages.Reactions": { "desc": "List of message reactions", "params": { - "hash": "Hash used for caching, for more info click here", + "hash": "Hash used for caching, can also be locally regenerated using the algorithm specified here \u00bb.", "reactions": "Reactions" } }, @@ -10293,7 +11548,7 @@ "messages.SavedReactionTags": { "desc": "List of reaction tag \u00bb names assigned by the user.", "params": { - "hash": "Hash used for caching, for more info click here", + "hash": "Hash used for caching, for more info click here. Can also be manually regenerated, if needed, using the custom algorithm specified here \u00bb.", "tags": "Saved reaction tags." } }, @@ -10348,10 +11603,12 @@ "messages.SponsoredMessages": { "desc": "A set of sponsored messages associated to a channel", "params": { + "between_delay": "For sponsored messages to show on channel videos \u00bb, the number of seconds to wait after the previous ad is hidden, before showing the next ad.", "chats": "Chats mentioned in the sponsored messages", "flags": "Flags, see TL conditional fields", "messages": "Sponsored messages", "posts_between": "If set, specifies the minimum number of messages between shown sponsored messages; otherwise, only one sponsored message must be shown after all ordinary messages.", + "start_delay": "For sponsored messages to show on channel videos \u00bb, the number of seconds to wait before showing the first ad.", "users": "Users mentioned in the sponsored messages" } }, @@ -10430,8 +11687,12 @@ } }, "messages.WebPagePreview": { - "desc": "", - "params": {} + "desc": "Represents a webpage preview.", + "params": { + "chats": "Chats mentioned in the gift field.", + "media": "The messageMediaWebPage or a messageMediaEmpty if there is no preview.", + "users": "Users mentioned within the media object." + } }, "payments.BankCardData": { "desc": "Credit card info, provided by the card's bank(s)", @@ -10440,15 +11701,25 @@ "title": "Credit card title" } }, + "payments.CheckCanSendGiftResultFail": { + "desc": "The specified gift cannot be sent yet for the specified reason.", + "params": { + "reason": "The reason why it can't be sent yet." + } + }, + "payments.CheckCanSendGiftResultOk": { + "desc": "The specified gift can be sent.", + "params": {} + }, "payments.CheckedGiftCode": { "desc": "Contains info about a Telegram Premium giftcode link.", "params": { "chats": "Mentioned chats", "date": "Creation date of the gift code.", + "days": "", "flags": "Flags, see TL conditional fields", "from_id": "The peer that created the gift code.", "giveaway_msg_id": "Message ID of the giveaway in the channel specified in from_id.", - "months": "Duration in months of the gifted Telegram Premium subscription.", "to_id": "The destination user of the gift.", "used_date": "When was the giftcode imported, if it was imported.", "users": "Mentioned users", @@ -10585,6 +11856,20 @@ "url": "URL for additional payment credentials verification" } }, + "payments.ResaleStarGifts": { + "desc": "List of gifts currently on resale \u00bb.", + "params": { + "attributes": "Possible gift attributes, only set if payments.getResaleStarGifts.attributes_hash is set (on the first call, it must be equal to 0).", + "attributes_hash": "Hash of the attributes field, pass this to payments.getResaleStarGifts.attributes_hash to avoid returning any attributes (flag not set) if they haven't changed.", + "chats": "Chats mentioned in the attributes.", + "count": "Total number of results.", + "counters": "Indicates the total number of gifts that have a specific attribute, only set if payments.getResaleStarGifts.offset is empty (since this field is not related to the current result page but to all of them, it's only returned on the first page).", + "flags": "Flags, see TL conditional fields", + "gifts": "Collectible gifts on resale (may be less than count, in which case next_offset will be set).", + "next_offset": "Offset for pagination, pass this to payments.getResaleStarGifts.offset to fetch the next results.", + "users": "Users mentioned in the attributes." + } + }, "payments.SavedInfo": { "desc": "Saved server-side order information", "params": { @@ -10594,22 +11879,85 @@ } }, "payments.SavedStarGifts": { - "desc": "", + "desc": "Represents a list of gifts.", + "params": { + "chat_notifications_enabled": "Ternary value: can be not set, set&true, set&false. Can only be set for channels we own: the value indicates whether we enabled gift notifications for this channel.", + "chats": "Channels mentioned in gifts", + "count": "Total number of results (can be less than the returned gifts, in which case next_offset will be set).", + "flags": "Flags, see TL conditional fields", + "gifts": "Gifts", + "next_offset": "Offset to pass to payments.getSavedStarGifts to fetch the next page of results.", + "users": "Users mentioned in gifts" + } + }, + "payments.StarGiftActiveAuctions": { + "desc": "{schema}", + "params": { + "auctions": "", + "chats": "", + "users": "" + } + }, + "payments.StarGiftActiveAuctionsNotModified": { + "desc": "{schema}", "params": {} }, - "payments.StarGiftUpgradePreview": { - "desc": "", + "payments.StarGiftAuctionAcquiredGifts": { + "desc": "{schema}", + "params": { + "chats": "", + "gifts": "", + "users": "" + } + }, + "payments.StarGiftAuctionState": { + "desc": "{schema}", + "params": { + "chats": "", + "gift": "", + "state": "", + "timeout": "", + "user_state": "", + "users": "" + } + }, + "payments.StarGiftCollections": { + "desc": "Represents a list of star gift collections \u00bb.", + "params": { + "collections": "Star gift collections." + } + }, + "payments.StarGiftCollectionsNotModified": { + "desc": "The list of star gift collections \u00bb hasn't changed.", "params": {} }, + "payments.StarGiftUpgradeAttributes": { + "desc": "{schema}", + "params": { + "attributes": "" + } + }, + "payments.StarGiftUpgradePreview": { + "desc": "A preview of the possible attributes (chosen randomly) a gift \u00bb can receive after upgrading it to a collectible gift \u00bb, see here \u00bb for more info.", + "params": { + "next_prices": "", + "prices": "", + "sample_attributes": "Possible gift attributes" + } + }, "payments.StarGiftWithdrawalUrl": { - "desc": "", - "params": {} + "desc": "A URL that can be used to import the exported NFT on Fragment.", + "params": { + "url": "The URL to open." + } }, "payments.StarGifts": { "desc": "Available gifts \u00bb.", "params": { + "chats": "Chats mentioned in the gifts field.", "gifts": "List of available gifts.", - "hash": "Hash used for caching, for more info click here" + "hash": "Hash used for caching, for more info click here", + "users": "Users mentioned in the gifts field." } }, "payments.StarGiftsNotModified": { @@ -10625,8 +11973,10 @@ "payments.StarsRevenueStats": { "desc": "Star revenue statistics, see here \u00bb for more info.", "params": { + "flags": "Flags, see TL conditional fields", "revenue_graph": "Star revenue graph (number of earned stars)", "status": "Current balance, current withdrawable balance and overall earned Telegram Stars", + "top_hours_graph": "For ad revenue statistics, ad impressions graph", "usd_rate": "Current conversion rate of Telegram Stars to USD" } }, @@ -10661,8 +12011,32 @@ } }, "payments.UniqueStarGift": { - "desc": "", - "params": {} + "desc": "Represents a collectible gift \u00bb.", + "params": { + "chats": "Chats mentioned in the gift field.", + "gift": "The starGiftUnique constructor.", + "users": "Users mentioned in the gift field." + } + }, + "payments.UniqueStarGiftValueInfo": { + "desc": "Information about the value of a collectible gift \u00bb.", + "params": { + "average_price": "The current average sale price of collectible gifts of the same type, in the smallest unit of the currency specified in currency.", + "currency": "Three-letter ISO 4217 currency code (a localized fiat currency used to represent prices and price estimations in this constructor).", + "flags": "Flags, see TL conditional fields", + "floor_price": "The current minimum price of collectible gifts of the same type, in the smallest unit of the currency specified in currency.", + "fragment_listed_count": "Number of gifts of the same type currently being resold on fragment.", + "fragment_listed_url": "Fragment link to the listing of gifts of the same type currently being resold on fragment.", + "initial_sale_date": "Initial purchase date of the gift.", + "initial_sale_price": "Initial purchase price in the smallest unit of the currency specified in currency (automatically converted from initial_sale_stars).", + "initial_sale_stars": "Initial purchase price in Stars.", + "last_sale_date": "Last resale date of the gift.", + "last_sale_on_fragment": "If set, the last sale was completed on Fragment.", + "last_sale_price": "Last resale price, in the smallest unit of the currency specified in currency.", + "listed_count": "Number of gifts of the same type currently being resold on Telegram.", + "value": "Estimated value of the gift, in the smallest unit of the currency specified in currency.", + "value_is_average": "If set, the value is calculated from the average value of sold gifts of the same type. Otherwise, it is based on the sale price of the gift." + } }, "payments.ValidatedRequestedInfo": { "desc": "Validated user-provided info", @@ -10688,6 +12062,15 @@ "users": "Users mentioned in the participants vector" } }, + "phone.GroupCallStars": { + "desc": "{schema}", + "params": { + "chats": "", + "top_donors": "", + "total_stars": "", + "users": "" + } + }, "phone.GroupCallStreamChannels": { "desc": "Info about RTMP streams in a group call or livestream", "params": { @@ -10804,28 +12187,6 @@ "total_since": "Total since" } }, - "stats.BroadcastRevenueStats": { - "desc": "Channel revenue ad statistics, see here \u00bb for more info.", - "params": { - "balances": "Current balance, current withdrawable balance and overall revenue", - "revenue_graph": "Ad revenue graph (in the smallest unit of the cryptocurrency in which revenue is calculated)", - "top_hours_graph": "Ad impressions graph", - "usd_rate": "Current conversion rate of the cryptocurrency (not in the smallest unit) in which revenue is calculated to USD" - } - }, - "stats.BroadcastRevenueTransactions": { - "desc": "Channel ad revenue transactions \u00bb.", - "params": { - "count": "Total number of transactions.", - "transactions": "Transactions" - } - }, - "stats.BroadcastRevenueWithdrawalUrl": { - "desc": "Contains the URL to use to withdraw channel ad revenue.", - "params": { - "url": "A unique URL to a Fragment page where the user will be able to specify and submit the address of the TON wallet where the funds will be sent." - } - }, "stats.BroadcastStats": { "desc": "Channel statistics.", "params": { @@ -10946,6 +12307,17 @@ "desc": "WEBP image. MIME type: image/webp.", "params": {} }, + "stories.Albums": { + "desc": "Story albums \u00bb.", + "params": { + "albums": "The albums.", + "hash": "Hash to pass to stories.getAlbums to avoid returning any results if they haven't changed." + } + }, + "stories.AlbumsNotModified": { + "desc": "The story album list \u00bb hasn't changed.", + "params": {} + }, "stories.AllStories": { "desc": "Full list of active (or active and hidden) stories.", "params": { @@ -10967,6 +12339,12 @@ "stealth_mode": "Current stealth mode information" } }, + "stories.CanSendStoryCount": { + "desc": "Contains the number of available active story slots (equal to the value of the story_expiring_limit_* client configuration parameter minus the number of currently active stories).", + "params": { + "count_remains": "Remaining active story slots." + } + }, "stories.FoundStories": { "desc": "Stories found using global story search \u00bb.", "params": { @@ -11148,6 +12526,19 @@ "size": "File size" } }, + "users.SavedMusic": { + "desc": "List of songs currently pinned on a user's profile, see here \u00bb for more info.", + "params": { + "count": "Total number of songs (can be bigger than documents depending on the passed limit, and the default maximum limit in which case pagination is required).", + "documents": "Songs." + } + }, + "users.SavedMusicNotModified": { + "desc": "This subset of the songs currently pinned on a user's profile hasn't changed, see here \u00bb for more info.", + "params": { + "count": "Total number of songs on the user's profile." + } + }, "users.UserFull": { "desc": "Full user information", "params": { @@ -11157,12 +12548,17 @@ } }, "users.Users": { - "desc": "", - "params": {} + "desc": "Describes a list of users (or bots).", + "params": { + "users": "Users" + } }, "users.UsersSlice": { - "desc": "", - "params": {} + "desc": "Describes a partial list of users.", + "params": { + "count": "Total number of users (bigger than the users specified in users)", + "users": "Subset of users." + } } }, "method": { @@ -11234,8 +12630,11 @@ } }, "InvokeWithReCaptcha": { - "desc": "", - "params": {} + "desc": "Official clients only: re-execute a method call that required reCAPTCHA verification via a RECAPTCHA_CHECK_%s__%s, where the first placeholder is the action, and the second one is the reCAPTCHA key ID.", + "params": { + "query": "The original method call.", + "token": "reCAPTCHA token received after verification." + } }, "InvokeWithTakeout": { "desc": "Invoke a method within a takeout session, see here \u00bb for more info.", @@ -11260,10 +12659,6 @@ "value_hashes": "Types of values sent and their hashes" } }, - "account.AddNoPaidMessagesException": { - "desc": "", - "params": {} - }, "account.CancelPasswordEmail": { "desc": "Cancel the code that was sent to verify an email to use as 2FA recovery method.", "params": {} @@ -11347,6 +12742,12 @@ "slug": "Slug of the link, obtained as specified here \u00bb." } }, + "account.DeletePasskey": { + "desc": "{schema}", + "params": { + "id": "" + } + }, "account.DeleteSecureValue": { "desc": "Delete stored Telegram Passport documents, for more info see the passport docs \u00bb", "params": { @@ -11430,8 +12831,10 @@ } }, "account.GetCollectibleEmojiStatuses": { - "desc": "", - "params": {} + "desc": "Obtain a list of emoji statuses \u00bb for owned collectible gifts.", + "params": { + "hash": "Hash for pagination" + } }, "account.GetConnectedBots": { "desc": "List all currently connected business bots \u00bb", @@ -11495,7 +12898,15 @@ } }, "account.GetPaidMessagesRevenue": { - "desc": "", + "desc": "Get the number of stars we have received from the specified user thanks to paid messages \u00bb; the received amount will be equal to the sent amount multiplied by stars_paid_message_commission_permille divided by 1000.", + "params": { + "flags": "Flags, see TL conditional fields", + "parent_peer": "If set, can contain the ID of a monoforum (channel direct messages) to obtain the number of stars the user has spent to send us direct messages via the channel.", + "user_id": "The user that paid to send us messages." + } + }, + "account.GetPasskeys": { + "desc": "{schema}", "params": {} }, "account.GetPassword": { @@ -11524,6 +12935,12 @@ "hash": "Hash used for caching, for more info click here." } }, + "account.GetSavedMusicIds": { + "desc": "Fetch the full list of only the IDs of songs currently added to the profile, see here \u00bb for more info.", + "params": { + "hash": "Hash generated \u00bb from the previously returned list of IDs." + } + }, "account.GetSavedRingtones": { "desc": "Fetch saved notification sounds", "params": { @@ -11557,6 +12974,14 @@ "period": "Time during which the temporary password will be valid, in seconds; should be between 60 and 86400" } }, + "account.GetUniqueGiftChatThemes": { + "desc": "Obtain all chat themes \u00bb associated to owned collectible gifts \u00bb.", + "params": { + "hash": "Hash from a previously returned account.chatThemes constructor, to avoid returning any result if the theme list hasn't changed.", + "limit": "Maximum number of results to return, see pagination", + "offset": "Offset for pagination." + } + }, "account.GetWallPaper": { "desc": "Get info about a certain wallpaper", "params": { @@ -11573,6 +12998,10 @@ "desc": "Get web login widget authorizations", "params": {} }, + "account.InitPasskeyRegistration": { + "desc": "{schema}", + "params": {} + }, "account.InitTakeoutSession": { "desc": "Initialize a takeout session, see here \u00bb for more info.", "params": { @@ -11621,6 +13050,12 @@ "token_type": "Device token type, see PUSH updates for the possible values." } }, + "account.RegisterPasskey": { + "desc": "{schema}", + "params": { + "credential": "" + } + }, "account.ReorderUsernames": { "desc": "Reorder usernames associated with the currently logged-in user.", "params": { @@ -11702,6 +13137,15 @@ "users": "Whether the new settings should affect all private chats" } }, + "account.SaveMusic": { + "desc": "Adds or removes a song from the current user's profile see here \u00bb for more info on the music tab of the profile page.", + "params": { + "after_id": "If set, the song will be added after the passed song (must be already pinned on the profile).", + "flags": "Flags, see TL conditional fields", + "id": "The song to add or remove; can be an already added song when reordering songs with after_id. Adding an already added song will never re-add it, only move it to the top of the song list (or after the song passed in after_id).", + "unsave": "If set, removes the song." + } + }, "account.SaveRingtone": { "desc": "Save or remove saved notification sound.", "params": { @@ -11790,6 +13234,12 @@ "settings": "Global privacy settings" } }, + "account.SetMainProfileTab": { + "desc": "Changes the main profile tab of the current user, see here \u00bb for more info.", + "params": { + "tab": "The tab to set as main tab." + } + }, "account.SetPrivacy": { "desc": "Change privacy settings of current account", "params": { @@ -11810,6 +13260,16 @@ "peer": "The chat to pause" } }, + "account.ToggleNoPaidMessagesException": { + "desc": "Allow a user to send us messages without paying if paid messages \u00bb are enabled.", + "params": { + "flags": "Flags, see TL conditional fields", + "parent_peer": "If set, applies the setting within the monoforum aka direct messages \u00bb (pass the ID of the monoforum, not the ID of the associated channel).", + "refund_charged": "If set and require_payment is not set, refunds the amounts the user has already paid us to send us messages (directly or via a monoforum).", + "require_payment": "If set, requires the user to pay in order to send us messages. Can only be set by monoforums, not users, i.e. parent_peer must be set if this flag is set; users must instead use the inputPrivacyKeyNoPaidMessages privacy setting to remove a previously added exemption. If not set, allows the user to send us messages without paying (can be unset by both monoforums and users).", + "user_id": "The user to exempt or unexempt." + } + }, "account.ToggleSponsoredMessages": { "desc": "Disable or re-enable Telegram ads for the current Premium account.", "params": { @@ -11877,7 +13337,6 @@ "account.UpdateColor": { "desc": "Update the accent color and background custom emoji \u00bb of the current account.", "params": { - "background_emoji_id": "Custom emoji ID used in the accent color pattern.", "color": "ID of the accent color palette \u00bb to use (not RGB24, see here \u00bb for more info).", "flags": "Flags, see TL conditional fields", "for_profile": "Whether to change the accent color emoji pattern of the profile page; otherwise, the accent color and emoji pattern of messages will be changed." @@ -11887,10 +13346,10 @@ "desc": "Connect a business bot \u00bb to the current account, or to change the current connection settings.", "params": { "bot": "The bot to connect or disconnect", - "can_reply": "Whether the bot can reply to messages it receives from us, on behalf of us using the business connection.", "deleted": "Whether to fully disconnect the bot from the current account.", "flags": "Flags, see TL conditional fields", - "recipients": "Configuration for the business connection" + "recipients": "Configuration for the business connection", + "rights": "Business bot rights." } }, "account.UpdateDeviceLocked": { @@ -12023,6 +13482,14 @@ "phone_number": "Phone number" } }, + "auth.CheckPaidAuth": { + "desc": "Checks the status of a login payment.", + "params": { + "form_id": "The payment form ID passed to payments.sendPaymentForm.", + "phone_code_hash": "The phone code hash obtained from auth.sendCode", + "phone_number": "Phone number" + } + }, "auth.CheckPassword": { "desc": "Try logging to an account protected by a 2FA password.", "params": { @@ -12055,6 +13522,15 @@ "except_ids": "List of already logged-in user IDs, to prevent logging in twice with the same user" } }, + "auth.FinishPasskeyLogin": { + "desc": "{schema}", + "params": { + "credential": "", + "flags": "Flags, see TL conditional fields", + "from_auth_key_id": "", + "from_dc_id": "" + } + }, "auth.ImportAuthorization": { "desc": "Logs in a user using a key transmitted from his native data-center.", "params": { @@ -12085,6 +13561,13 @@ "web_auth_token": "The authorization token" } }, + "auth.InitPasskeyLogin": { + "desc": "{schema}", + "params": { + "api_hash": "", + "api_id": "" + } + }, "auth.LogOut": { "desc": "Logs out the user.", "params": {} @@ -12248,8 +13731,10 @@ } }, "bots.GetBotRecommendations": { - "desc": "", - "params": {} + "desc": "Obtain a list of similarly themed bots, selected based on similarities in their subscriber bases, see here \u00bb for more info.", + "params": { + "bot": "The method will return bots related to the passed bot." + } }, "bots.GetPopularAppBots": { "desc": "Fetch popular Main Mini Apps, to be used in the apps tab of global search \u00bb.", @@ -12347,8 +13832,14 @@ } }, "bots.SetCustomVerification": { - "desc": "", - "params": {} + "desc": "Verify a user or chat on behalf of an organization \u00bb.", + "params": { + "bot": "Must not be set if invoked by a bot, must be set to the ID of an owned bot if invoked by a user.", + "custom_description": "Custom description for the verification, the UTF-8 length limit for this field is contained in bot_verification_description_length_limit \u00bb. If not set, Was verified by organization \"organization_name\" will be used as description.", + "enabled": "If set, adds the verification; otherwise removes verification.", + "flags": "Flags, see TL conditional fields", + "peer": "The peer to verify" + } }, "bots.ToggleUserEmojiStatusPermission": { "desc": "Allow or prevent a bot from changing our emoji status \u00bb", @@ -12381,6 +13872,13 @@ "user_id": "The user whose emoji status should be changed" } }, + "channels.CheckSearchPostsFlood": { + "desc": "Check if the specified global post search \u00bb requires payment.", + "params": { + "flags": "Flags, see TL conditional fields", + "query": "The query." + } + }, "channels.CheckUsername": { "desc": "Check if a username is free and can be assigned to a channel/supergroup", "params": { @@ -12409,18 +13907,6 @@ "ttl_period": "Time-to-live of all messages that will be sent in the supergroup: once message.date+message.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well. You can use messages.setDefaultHistoryTTL to edit this value later." } }, - "channels.CreateForumTopic": { - "desc": "Create a forum topic; requires manage_topics rights.", - "params": { - "channel": "The forum", - "flags": "Flags, see TL conditional fields", - "icon_color": "If no custom emoji icon is specified, specifies the color of the fallback topic icon (RGB), one of 0x6FB9F0, 0xFFD67E, 0xCB86DB, 0x8EEE98, 0xFF93B2, or 0xFB6F5F.", - "icon_emoji_id": "ID of the custom emoji used as topic icon. Telegram Premium users can use any custom emoji, other users can only use the custom emojis contained in the inputStickerSetEmojiDefaultTopicIcons emoji pack.", - "random_id": "Unique client message ID to prevent duplicate sending of the same event", - "send_as": "Create the topic as the specified peer", - "title": "Topic title (maximum UTF-8 length: 128)" - } - }, "channels.DeactivateAllUsernames": { "desc": "Disable all purchased usernames of a supergroup or channel", "params": { @@ -12456,18 +13942,12 @@ "participant": "The participant whose messages should be deleted" } }, - "channels.DeleteTopicHistory": { - "desc": "Delete message history of a forum topic", - "params": { - "channel": "Forum", - "top_msg_id": "Topic ID" - } - }, "channels.EditAdmin": { "desc": "Modify the admin rights of a user in a supergroup/channel.", "params": { "admin_rights": "The admin rights", "channel": "The supergroup/channel.", + "flags": "Flags, see TL conditional fields", "rank": "Indicates the role (rank) of the admin in the group: just an arbitrary string", "user_id": "The ID of the user whose admin rights should be modified" } @@ -12480,26 +13960,6 @@ "participant": "Participant to ban" } }, - "channels.EditCreator": { - "desc": "Transfer channel ownership", - "params": { - "channel": "Channel", - "password": "2FA password of account", - "user_id": "New channel owner" - } - }, - "channels.EditForumTopic": { - "desc": "Edit forum topic; requires manage_topics rights.", - "params": { - "channel": "Supergroup", - "closed": "If present, will update the open/closed status of the topic.", - "flags": "Flags, see TL conditional fields", - "hidden": "If present, will hide/unhide the topic (only valid for the \"General\" topic, id=1).", - "icon_emoji_id": "If present, updates the custom emoji used as topic icon. Telegram Premium users can use any custom emoji, other users can only use the custom emojis contained in the inputStickerSetEmojiDefaultTopicIcons emoji pack. Pass 0 to switch to the fallback topic icon.", - "title": "If present, will update the topic title (maximum UTF-8 length: 128).", - "topic_id": "Topic ID" - } - }, "channels.EditLocation": { "desc": "Edit location of geogroup, see here \u00bb for more info on geogroups.", "params": { @@ -12567,25 +14027,6 @@ "id": "IDs of channels/supergroups to get info about" } }, - "channels.GetForumTopics": { - "desc": "Get topics of a forum", - "params": { - "channel": "Supergroup", - "flags": "Flags, see TL conditional fields", - "limit": "Maximum number of results to return, see pagination. For optimal performance, the number of returned topics is chosen by the server and can be smaller than the specified limit.", - "offset_date": "Offsets for pagination, for more info click here, date of the last message of the last found topic. Use 0 or any date in the future to get results from the last topic.", - "offset_id": "Offsets for pagination, for more info click here, ID of the last message of the last found topic (or initially 0).", - "offset_topic": "Offsets for pagination, for more info click here, ID of the last found topic (or initially 0).", - "q": "Search query" - } - }, - "channels.GetForumTopicsByID": { - "desc": "Get forum topics by their ID", - "params": { - "channel": "Forum", - "topics": "Topic IDs" - } - }, "channels.GetFullChannel": { "desc": "Get full info about a supergroup, gigagroup or channel", "params": { @@ -12606,6 +14047,13 @@ "offset": "Offset for pagination" } }, + "channels.GetMessageAuthor": { + "desc": "Can only be invoked by non-bot admins of a monoforum \u00bb, obtains the original sender of a message sent by other monoforum admins to the monoforum, on behalf of the channel associated to the monoforum.", + "params": { + "channel": "ID of the monoforum.", + "id": "ID of the message sent by a monoforum admin." + } + }, "channels.GetMessages": { "desc": "Get channel/supergroup messages", "params": { @@ -12633,6 +14081,9 @@ "channels.GetSendAs": { "desc": "Obtains a list of peers that can be used to send messages in a specific group", "params": { + "flags": "Flags, see TL conditional fields", + "for_live_stories": "", + "for_paid_reactions": "If set, fetches the list of peers that can be used to send paid reactions to messages of a specific peer.", "peer": "The group where we intend to send messages" } }, @@ -12663,21 +14114,12 @@ } }, "channels.ReadMessageContents": { - "desc": "Mark channel/supergroup message contents as read", + "desc": "Mark channel/supergroup message contents as read, emitting an updateChannelReadMessagesContents.", "params": { "channel": "Channel/supergroup", "id": "IDs of messages whose contents should be marked as read" } }, - "channels.ReorderPinnedForumTopics": { - "desc": "Reorder pinned forum topics", - "params": { - "channel": "Supergroup ID", - "flags": "Flags, see TL conditional fields", - "force": "If not set, the order of only the topics present both server-side and in order will be changed (i.e. mentioning topics not pinned server-side in order will not pin them, and not mentioning topics pinned server-side will not unpin them). If set, the entire server-side pinned topic list will be replaced with order (i.e. mentioning topics not pinned server-side in order will pin them, and not mentioning topics pinned server-side will unpin them)", - "order": "Topic IDs \u00bb" - } - }, "channels.ReorderUsernames": { "desc": "Reorder active usernames", "params": { @@ -12708,13 +14150,16 @@ } }, "channels.SearchPosts": { - "desc": "Globally search for posts from public channels \u00bb (including those we aren't a member of) containing a specific hashtag.", + "desc": "Globally search for posts from public channels \u00bb (including those we aren't a member of) containing either a specific hashtag, or a full text query.", "params": { + "allow_paid_stars": "For full text post searches (query), allows payment of the specified amount of Stars for the search, see here \u00bb for more info on the full flow.", + "flags": "Flags, see TL conditional fields", "hashtag": "The hashtag to search, without the # character.", "limit": "Maximum number of results to return, see pagination", "offset_id": "Offsets for pagination, for more info click here", "offset_peer": "Offsets for pagination, for more info click here", - "offset_rate": "Initially 0, then set to the next_rate parameter of messages.messagesSlice" + "offset_rate": "Initially 0, then set to the next_rate parameter of messages.messagesSlice, or if that is absent, the date of the last returned message.", + "query": "The full text query: each user has a limited amount of free full text search slots, after which payment is required, see here \u00bb for more info on the full flow." } }, "channels.SetBoostsToUnblockRestrictions": { @@ -12738,6 +14183,13 @@ "stickerset": "The custom emoji stickerset to associate to the supergroup" } }, + "channels.SetMainProfileTab": { + "desc": "Changes the main profile tab of a channel, see here \u00bb for more info.", + "params": { + "channel": "The channel.", + "tab": "The tab to set as main tab." + } + }, "channels.SetStickers": { "desc": "Associate a stickerset to the supergroup", "params": { @@ -12752,11 +14204,19 @@ "enabled": "Enable or disable the native antispam system." } }, + "channels.ToggleAutotranslation": { + "desc": "Toggle autotranslation in a channel, for all users: see here \u00bb for more info.", + "params": { + "channel": "The channel where to toggle autotranslation.", + "enabled": "Whether to enable or disable autotranslation." + } + }, "channels.ToggleForum": { "desc": "Enable or disable forum functionality in a supergroup.", "params": { "channel": "Supergroup ID", - "enabled": "Enable or disable forum functionality" + "enabled": "Enable or disable forum functionality", + "tabs": "If true enables the tabbed forum UI, otherwise enables the list-based forum UI." } }, "channels.ToggleJoinRequest": { @@ -12836,15 +14296,12 @@ } }, "channels.UpdatePaidMessagesPrice": { - "desc": "", - "params": {} - }, - "channels.UpdatePinnedForumTopic": { - "desc": "Pin or unpin forum topics", + "desc": "Enable or disable paid messages \u00bb in this supergroup or monoforum.", "params": { - "channel": "Supergroup ID", - "pinned": "Whether to pin or unpin the topic", - "topic_id": "Forum topic ID" + "broadcast_messages_allowed": "Only usable for channels, enables or disables the associated monoforum aka direct messages.", + "channel": "Pass the supergroup ID for supergroups and the ID of the channel to modify the setting in the associated monoforum.", + "flags": "Flags, see TL conditional fields", + "send_paid_messages_stars": "Specifies the required amount of Telegram Stars users must pay to send messages to the supergroup or monoforum." } }, "channels.UpdateUsername": { @@ -12944,6 +14401,7 @@ "flags": "Flags, see TL conditional fields", "id": "Telegram ID of the other user", "last_name": "Last name", + "note": "", "phone": "User's phone number, may be omitted to simply add the user to the contact list, without a phone number." } }, @@ -13026,8 +14484,10 @@ "params": {} }, "contacts.GetSponsoredPeers": { - "desc": "", - "params": {} + "desc": "Obtain a list of sponsored peer search results for a given query", + "params": { + "q": "The query" + } }, "contacts.GetStatuses": { "desc": "Use this method to obtain the online statuses of all contacts with an accessible Telegram account.", @@ -13118,6 +14578,13 @@ "my_stories_from": "Whether the peer should be removed from the story blocklist; if not set, the peer will be removed from the main blocklist, see here \u00bb for more info." } }, + "contacts.UpdateContactNote": { + "desc": "{schema}", + "params": { + "id": "", + "note": "" + } + }, "folders.EditPeerFolders": { "desc": "Edit peers in peer folder", "params": { @@ -13215,7 +14682,7 @@ "params": {} }, "help.GetPromoData": { - "desc": "Get MTProxy/Public Service Announcement information", + "desc": "Returns a set of useful suggestions and PSA/MTProxy sponsored peers, see here \u00bb for more info.", "params": {} }, "help.GetRecentMeUrls": { @@ -13316,8 +14783,10 @@ "params": { "button_id": "ID of the login button", "flags": "Flags, see TL conditional fields", + "match_code": "", "msg_id": "Message ID of the message with the login button", "peer": "The location of the message", + "share_phone_number": "", "url": "URL used for link URL authorization, click here for more info \u00bb", "write_allowed": "Set this flag to allow the bot to send messages to you (if requested)" } @@ -13330,6 +14799,14 @@ "user_id": "User ID to be added" } }, + "messages.AppendTodoList": { + "desc": "Appends one or more items to a todo list \u00bb.", + "params": { + "list": "Items to append.", + "msg_id": "ID of the message with the todo list.", + "peer": "Peer where the todo list was posted." + } + }, "messages.CheckChatInvite": { "desc": "Check the validity of a chat invite link and get basic info about it", "params": { @@ -13354,6 +14831,13 @@ "shortcut": "Shorcut name (not ID!)." } }, + "messages.CheckUrlAuthMatchCode": { + "desc": "{schema}", + "params": { + "match_code": "", + "url": "" + } + }, "messages.ClearAllDrafts": { "desc": "Clear all drafts.", "params": {} @@ -13375,7 +14859,6 @@ "flags": "Flags, see TL conditional fields", "fullscreen": "The user expanded the video to full screen, and then clicked on it.", "media": "The user clicked on the media", - "peer": "The channel/bot where the ad is located", "random_id": "The ad's unique ID." } }, @@ -13388,6 +14871,25 @@ "users": "List of user IDs to be invited" } }, + "messages.CreateForumTopic": { + "desc": "{schema}", + "params": { + "flags": "Flags, see TL conditional fields", + "icon_color": "", + "icon_emoji_id": "", + "peer": "", + "random_id": "", + "send_as": "", + "title": "", + "title_missing": "" + } + }, + "messages.DeclineUrlAuth": { + "desc": "{schema}", + "params": { + "url": "" + } + }, "messages.DeleteChat": { "desc": "Delete a chat", "params": { @@ -13465,13 +14967,14 @@ } }, "messages.DeleteSavedHistory": { - "desc": "Deletes messages forwarded from a specific peer to saved messages \u00bb.", + "desc": "Deletes messages from a monoforum topic \u00bb, or deletes messages forwarded from a specific peer to saved messages \u00bb.", "params": { "flags": "Flags, see TL conditional fields", "max_date": "Delete all messages older than this UNIX timestamp", "max_id": "Maximum ID of message to delete", "min_date": "Delete all messages newer than this UNIX timestamp", - "peer": "Peer, whose messages will be deleted from saved messages \u00bb" + "parent_peer": "If set, affects the messages of the passed monoforum topic \u00bb, otherwise affects saved messages \u00bb.", + "peer": "Peer, whose messages will be deleted from saved messages \u00bb, or the ID of the topic." } }, "messages.DeleteScheduledMessages": { @@ -13481,6 +14984,13 @@ "peer": "Peer" } }, + "messages.DeleteTopicHistory": { + "desc": "{schema}", + "params": { + "peer": "", + "top_msg_id": "" + } + }, "messages.DiscardEncryption": { "desc": "Cancels a request for creation and/or delete info on secret chat.", "params": { @@ -13504,6 +15014,14 @@ "user_id": "The user to make admin" } }, + "messages.EditChatCreator": { + "desc": "{schema}", + "params": { + "password": "", + "peer": "", + "user_id": "" + } + }, "messages.EditChatDefaultBannedRights": { "desc": "Edit the default banned rights of a channel/supergroup/group.", "params": { @@ -13511,6 +15029,14 @@ "peer": "The peer" } }, + "messages.EditChatParticipantRank": { + "desc": "{schema}", + "params": { + "participant": "", + "peer": "", + "rank": "" + } + }, "messages.EditChatPhoto": { "desc": "Changes chat photo and sends a service message on it", "params": { @@ -13546,7 +15072,19 @@ "text": "Fact-check (maximum UTF-8 length specified in appConfig.factcheck_length_limit)." } }, - "messages.EditInlineBotMessage": { + "messages.EditForumTopic": { + "desc": "{schema}", + "params": { + "closed": "", + "flags": "Flags, see TL conditional fields", + "hidden": "", + "icon_emoji_id": "", + "peer": "", + "title": "", + "topic_id": "" + } + }, + "messages.EditInlineBotMessage": { "desc": "Edit an inline bot message", "params": { "entities": "Message entities for styled text", @@ -13572,7 +15110,8 @@ "peer": "Where was the message sent", "quick_reply_shortcut_id": "If specified, edits a quick reply shortcut message, instead \u00bb.", "reply_markup": "Reply markup for inline keyboards", - "schedule_date": "Scheduled message date for scheduled messages" + "schedule_date": "Scheduled message date for scheduled messages", + "schedule_repeat_period": "" } }, "messages.EditQuickReplyShortcut": { @@ -13606,20 +15145,26 @@ "desc": "Forwards messages by their IDs.", "params": { "allow_paid_floodskip": "Bots only: if set, allows sending up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance.", + "allow_paid_stars": "For paid messages \u00bb, specifies the amount of Telegram Stars the user has agreed to pay in order to send the message.", "background": "Whether to send the message in background", "drop_author": "Whether to forward messages without quoting the original author", "drop_media_captions": "Whether to strip captions from media", + "effect": "", "flags": "Flags, see TL conditional fields", "from_peer": "Source of messages", "id": "IDs of messages", "noforwards": "Only for bots, disallows further re-forwarding and saving of the messages, even if the destination chat doesn't have content protection enabled", "quick_reply_shortcut": "Add the messages to the specified quick reply shortcut \u00bb, instead.", "random_id": "Random ID to prevent resending of messages", + "reply_to": "Can only contain an inputReplyToMonoForum, to forward messages to a monoforum topic (mutually exclusive with top_msg_id).", "schedule_date": "Scheduled message date for scheduled messages", + "schedule_repeat_period": "", "send_as": "Forward the messages as the specified peer", "silent": "Whether to send messages silently (no notification will be triggered on the destination clients)", + "suggested_post": "Used to suggest a post to a channel, see here \u00bb for more info on the full flow.", "to_peer": "Destination peer", "top_msg_id": "Destination forum topic", + "video_timestamp": "Start playing the video at the specified timestamp (seconds).", "with_my_score": "When forwarding games, whether to include your score in the game" } }, @@ -13754,7 +15299,10 @@ }, "messages.GetDialogUnreadMarks": { "desc": "Get dialogs manually marked as unread", - "params": {} + "params": { + "flags": "Flags, see TL conditional fields", + "parent_peer": "Can be equal to the ID of a monoforum, to fetch monoforum topics manually marked as unread." + } }, "messages.GetDialogs": { "desc": "Returns the current user dialog list.", @@ -13784,6 +15332,10 @@ "size": "Size of the file in bytes" } }, + "messages.GetEmojiGameInfo": { + "desc": "{schema}", + "params": {} + }, "messages.GetEmojiGroups": { "desc": "Represents a list of emoji categories.", "params": { @@ -13890,12 +15442,37 @@ "hash": "Hash used for caching, for more info click here." } }, + "messages.GetForumTopics": { + "desc": "{schema}", + "params": { + "flags": "Flags, see TL conditional fields", + "limit": "Maximum number of results to return, see pagination", + "offset_date": "Offsets for pagination, for more info click here", + "offset_id": "Offsets for pagination, for more info click here", + "offset_topic": "", + "peer": "", + "q": "" + } + }, + "messages.GetForumTopicsByID": { + "desc": "{schema}", + "params": { + "peer": "", + "topics": "" + } + }, "messages.GetFullChat": { "desc": "Get full info about a basic group.", "params": { "chat_id": "Basic group ID." } }, + "messages.GetFutureChatCreatorAfterLeave": { + "desc": "{schema}", + "params": { + "peer": "" + } + }, "messages.GetGameHighScores": { "desc": "Get highscores of a game", "params": { @@ -14076,7 +15653,7 @@ "desc": "Fetch (a subset or all) messages in a quick reply shortcut \u00bb.", "params": { "flags": "Flags, see TL conditional fields", - "hash": "Hash used for caching, for more info click here", + "hash": "Hash for pagination, generated as specified here \u00bb (not the usual algorithm used for hash generation).", "id": "IDs of the messages to fetch, if empty fetches all of them.", "shortcut_id": "Quick reply shortcut ID." } @@ -14119,7 +15696,7 @@ } }, "messages.GetSavedDialogs": { - "desc": "Returns the current saved dialog list, see here \u00bb for more info.", + "desc": "Returns the current saved dialog list \u00bb or monoforum topic list \u00bb.", "params": { "exclude_pinned": "Exclude pinned dialogs", "flags": "Flags, see TL conditional fields", @@ -14127,7 +15704,16 @@ "limit": "Number of list elements to be returned", "offset_date": "Offsets for pagination, for more info click here", "offset_id": "Offsets for pagination, for more info click here (top_message ID used for pagination)", - "offset_peer": "Offset peer for pagination" + "offset_peer": "Offset peer for pagination", + "parent_peer": "If set, fetches the topic list of the passed monoforum, otherwise fetches the saved dialog list." + } + }, + "messages.GetSavedDialogsByID": { + "desc": "Obtain information about specific saved message dialogs \u00bb or monoforum topics \u00bb.", + "params": { + "flags": "Flags, see TL conditional fields", + "ids": "IDs of dialogs (topics) to fetch.", + "parent_peer": "If set, fetches monoforum topics \u00bb, otherwise fetches saved message dialogs \u00bb." } }, "messages.GetSavedGifs": { @@ -14137,16 +15723,18 @@ } }, "messages.GetSavedHistory": { - "desc": "Returns saved messages \u00bb forwarded from a specific peer", + "desc": "Fetch saved messages \u00bb forwarded from a specific peer, or fetch messages from a monoforum topic \u00bb.", "params": { "add_offset": "Number of list elements to be skipped, negative values are also accepted.", + "flags": "Flags, see TL conditional fields", "hash": "Result hash", "limit": "Number of results to return", "max_id": "If a positive value was transferred, the method will return only messages with IDs less than max_id", "min_id": "If a positive value was transferred, the method will return only messages with IDs more than min_id", "offset_date": "Only return messages sent before the specified date", "offset_id": "Only return messages starting from the specified message ID", - "peer": "Target peer" + "parent_peer": "If set, fetches messages from the specified monoforum, otherwise fetches from saved messages.", + "peer": "Target peer (or topic)" } }, "messages.GetSavedReactionTags": { @@ -14160,7 +15748,7 @@ "messages.GetScheduledHistory": { "desc": "Get scheduled messages", "params": { - "hash": "Hash used for caching, for more info click here. To generate the hash, populate the ids array with the id, date and edit_date (in this order) of the previously returned messages (in order, i.e. ids = [id1, date1, edit_date1, id2, date2, edit_date2, ...]).", + "hash": "Hash used for caching, for more info click here. To generate the hash, populate the ids array with the id, edit_date (0 if unedited) and date (in this order) of the previously returned messages (in order, i.e. ids = [id1, (edit_date1 ?? 0), date1, id2, (edit_date2 ?? 0), date2, ...]).", "peer": "Peer" } }, @@ -14210,6 +15798,8 @@ "messages.GetSponsoredMessages": { "desc": "Get a list of sponsored messages for a peer, see here \u00bb for more info.", "params": { + "flags": "Flags, see TL conditional fields", + "msg_id": "Must be set when fetching sponsored messages to show on channel videos \u00bb.", "peer": "The currently open channel/bot." } }, @@ -14261,6 +15851,7 @@ "min_id": "Only return reactions for messages starting from this message ID", "offset_id": "Offsets for pagination, for more info click here", "peer": "Peer", + "saved_peer_id": "If set, must be equal to the ID of a monoforum topic: will affect that topic in the monoforum passed in peer.", "top_msg_id": "If set, considers only reactions to messages within the specified forum topic" } }, @@ -14328,6 +15919,7 @@ "desc": "Manually mark dialog as unread", "params": { "flags": "Flags, see TL conditional fields", + "parent_peer": "If set, must be equal to the ID of a monoforum, and will affect the monoforum topic passed in peer.", "peer": "Dialog", "unread": "Mark as unread/read" } @@ -14396,7 +15988,7 @@ } }, "messages.ReadMessageContents": { - "desc": "Notifies the sender about the recipient having listened a voice message or watched a video.", + "desc": "Notifies the sender about the recipient having listened a voice message or watched a video, emitting an updateReadMessagesContents.", "params": { "id": "Message ID list" } @@ -14406,9 +15998,18 @@ "params": { "flags": "Flags, see TL conditional fields", "peer": "Peer", + "saved_peer_id": "If set, must be equal to the ID of a monoforum topic: will affect that topic in the monoforum passed in peer.", "top_msg_id": "Mark as read only reactions to messages within the specified forum topic" } }, + "messages.ReadSavedHistory": { + "desc": "Mark messages as read in a monoforum topic \u00bb.", + "params": { + "max_id": "If a positive value is passed, only messages with identifiers less or equal than the given one will be read.", + "parent_peer": "ID of the monoforum group.", + "peer": "ID of the topic." + } + }, "messages.ReceivedMessages": { "desc": "Confirms receipt of messages by a client, cancels PUSH-notification sending.", "params": { @@ -14430,6 +16031,15 @@ "order": "New dialog order" } }, + "messages.ReorderPinnedForumTopics": { + "desc": "{schema}", + "params": { + "flags": "Flags, see TL conditional fields", + "force": "", + "order": "", + "peer": "" + } + }, "messages.ReorderPinnedSavedDialogs": { "desc": "Reorder pinned saved message dialogs \u00bb.", "params": { @@ -14469,8 +16079,13 @@ } }, "messages.ReportMessagesDelivery": { - "desc": "", - "params": {} + "desc": "Used for Telegram Gateway verification messages \u00bb: indicate to the server that one or more messages were received by the client, if requested by the message.report_delivery_until_date flag or the equivalent flag in push notifications.", + "params": { + "flags": "Flags, see TL conditional fields", + "id": "The IDs of the received messages.", + "peer": "The peer where the messages were received.", + "push": "Must be set if the messages were received from a push notification." + } }, "messages.ReportReaction": { "desc": "Report a message reaction", @@ -14490,7 +16105,6 @@ "desc": "Report a sponsored message \u00bb, see here \u00bb for more info on the full flow.", "params": { "option": "Chosen report option, initially an empty string, see here \u00bb for more info on the full flow.", - "peer": "The channel/bot where the ad is located", "random_id": "The ad's unique ID." } }, @@ -14549,6 +16163,7 @@ "params": { "button_id": "The ID of the button with the authorization request", "flags": "Flags, see TL conditional fields", + "in_app_origin": "", "msg_id": "The message", "peer": "Peer where the message is located", "url": "URL used for link URL authorization, click here for more info \u00bb" @@ -14590,7 +16205,8 @@ "message": "The draft", "no_webpage": "Disable generation of the webpage preview", "peer": "Destination of the message that should be sent", - "reply_to": "If set, indicates that the message should be sent in reply to the specified message or story." + "reply_to": "If set, indicates that the message should be sent in reply to the specified message or story.", + "suggested_post": "Used to suggest a post to a channel, see here \u00bb for more info on the full flow." } }, "messages.SaveGif": { @@ -14668,7 +16284,7 @@ "min_date": "If a positive value was specified, the method will return only messages with date bigger than min_date", "offset_id": "Offsets for pagination, for more info click here", "offset_peer": "Offsets for pagination, for more info click here", - "offset_rate": "Initially 0, then set to the next_rate parameter of messages.messagesSlice", + "offset_rate": "Initially 0, then set to the next_rate parameter of messages.messagesSlice, or if that is absent, the date of the last returned message.", "q": "Query", "users_only": "Whether to search only in private chats" } @@ -14744,6 +16360,7 @@ "messages.SendInlineBotResult": { "desc": "Send a result obtained using messages.getInlineBotResults.", "params": { + "allow_paid_stars": "For paid messages \u00bb, specifies the amount of Telegram Stars the user has agreed to pay in order to send the message.", "background": "Whether to send the message in background", "clear_draft": "Whether to clear the draft", "flags": "Flags, see TL conditional fields", @@ -14763,6 +16380,7 @@ "desc": "Send a media", "params": { "allow_paid_floodskip": "Bots only: if set, allows sending up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance.", + "allow_paid_stars": "For paid messages \u00bb, specifies the amount of Telegram Stars the user has agreed to pay in order to send the message.", "background": "Send message in background", "clear_draft": "Clear the draft", "effect": "Specifies a message effect \u00bb to use for the message.", @@ -14778,8 +16396,10 @@ "reply_markup": "Reply markup for bot keyboards", "reply_to": "If set, indicates that the message should be sent in reply to the specified message or story.", "schedule_date": "Scheduled message date for scheduled messages", + "schedule_repeat_period": "", "send_as": "Send this message as the specified peer", "silent": "Send message silently (no notification should be triggered)", + "suggested_post": "Used to suggest a post to a channel, see here \u00bb for more info on the full flow.", "update_stickersets_order": "Whether to move used stickersets to top, see here for more info on this flag \u00bb" } }, @@ -14787,6 +16407,7 @@ "desc": "Sends a message to a chat", "params": { "allow_paid_floodskip": "Bots only: if set, allows sending up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance.", + "allow_paid_stars": "For paid messages \u00bb, specifies the amount of Telegram Stars the user has agreed to pay in order to send the message.", "background": "Send this message as background message", "clear_draft": "Clear the draft field", "effect": "Specifies a message effect \u00bb to use for the message.", @@ -14802,8 +16423,10 @@ "reply_markup": "Reply markup for sending bot buttons", "reply_to": "If set, indicates that the message should be sent in reply to the specified message or story. Also used to quote other messages.", "schedule_date": "Scheduled message date for scheduled messages", + "schedule_repeat_period": "", "send_as": "Send this message as the specified peer", "silent": "Send this message silently (no notifications for the receivers)", + "suggested_post": "Used to suggest a post to a channel, see here \u00bb for more info on the full flow.", "update_stickersets_order": "Whether to move used stickersets to top, see here for more info on this flag \u00bb" } }, @@ -14811,6 +16434,7 @@ "desc": "Send an album or grouped media", "params": { "allow_paid_floodskip": "Bots only: if set, allows sending up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance.", + "allow_paid_stars": "For paid messages \u00bb, specifies the amount of Telegram Stars the user has agreed to pay in order to send the message.", "background": "Send in background?", "clear_draft": "Whether to clear drafts", "effect": "Specifies a message effect \u00bb to use for the message.", @@ -14829,7 +16453,14 @@ }, "messages.SendPaidReaction": { "desc": "Sends one or more paid Telegram Star reactions \u00bb, transferring Telegram Stars \u00bb to a channel's balance.", - "params": {} + "params": { + "count": "The number of stars to send (each will increment the reaction counter by one).", + "flags": "Flags, see TL conditional fields", + "msg_id": "The message to react to", + "peer": "The channel", + "private": "Each post with star reactions has a leaderboard with the top senders, but users can opt out of appearing there if they prefer more privacy. Not populating this field will use the default reaction privacy, stored on the server and synced to clients using updatePaidReactionPrivacy (see here for more info).", + "random_id": "Unique client message ID required to prevent message resending. Note: this argument must be composed of a 64-bit integer where the lower 32 bits are random, and the higher 32 bits are equal to the current unixtime, i.e. uint64_t random_id = (time() << 32) | ((uint64_t)random_uint32_t()): this differs from the random_id format of all other methods in the API, which just take 64 random bits." + } }, "messages.SendQuickReplyMessages": { "desc": "Send a quick reply shortcut \u00bb.", @@ -14848,7 +16479,7 @@ "flags": "Flags, see TL conditional fields", "msg_id": "Message ID to react to", "peer": "Peer", - "reaction": "A list of reactions" + "reaction": "A list of reactions (doesn't accept reactionPaid constructors, use messages.sendPaidReaction to send paid reactions, instead)." } }, "messages.SendScheduledMessages": { @@ -14930,10 +16561,10 @@ } }, "messages.SetChatTheme": { - "desc": "Change the chat theme of a certain chat", + "desc": "Change the chat theme of a certain chat, see here \u00bb for more info.", "params": { - "emoticon": "Emoji, identifying a specific chat theme; a list of chat themes can be fetched using account.getChatThemes", - "peer": "Private chat where to change theme" + "peer": "Private chat where to change theme", + "theme": "The theme to set." } }, "messages.SetChatWallPaper": { @@ -15036,6 +16667,15 @@ "peer": "The Telegram chat where the messages should be imported, click here for more info \u00bb" } }, + "messages.SummarizeText": { + "desc": "{schema}", + "params": { + "flags": "Flags, see TL conditional fields", + "id": "", + "peer": "", + "to_lang": "" + } + }, "messages.ToggleBotInAttachMenu": { "desc": "Enable or disable web bot attachment menu \u00bb", "params": { @@ -15063,7 +16703,9 @@ "desc": "Enable or disable content protection on a channel or chat", "params": { "enabled": "Enable or disable content protection", - "peer": "The chat or channel" + "flags": "Flags, see TL conditional fields", + "peer": "The chat or channel", + "request_msg_id": "" } }, "messages.TogglePaidReactionPrivacy": { @@ -15100,6 +16742,26 @@ "uninstall": "Uninstall the specified stickersets" } }, + "messages.ToggleSuggestedPostApproval": { + "desc": "Approve or reject a suggested post \u00bb.", + "params": { + "flags": "Flags, see TL conditional fields", + "msg_id": "ID of the suggestion message.", + "peer": "Both for users and channels, must contain the ID of the direct messages monoforum \u00bb (for channels, the topic ID is extracted automatically from the msg_id).", + "reject": "Reject the suggested post.", + "reject_comment": "Optional comment for rejections (can only be used if reject is set).", + "schedule_date": "Custom scheduling date." + } + }, + "messages.ToggleTodoCompleted": { + "desc": "Mark one or more items of a todo list \u00bb as completed or not completed.", + "params": { + "completed": "Items to mark as completed.", + "incompleted": "Items to mark as not completed.", + "msg_id": "ID of the message with the todo list.", + "peer": "Peer where the todo list was posted." + } + }, "messages.TranscribeAudio": { "desc": "Transcribe voice message", "params": { @@ -15128,6 +16790,7 @@ "params": { "flags": "Flags, see TL conditional fields", "peer": "Chat where to unpin", + "saved_peer_id": "If set, must be equal to the ID of a monoforum topic, and will unpin all messages pinned in the passed monoforum topic.", "top_msg_id": "Forum topic where to unpin" } }, @@ -15145,6 +16808,14 @@ "order": "New folder order" } }, + "messages.UpdatePinnedForumTopic": { + "desc": "{schema}", + "params": { + "peer": "", + "pinned": "", + "topic_id": "" + } + }, "messages.UpdatePinnedMessage": { "desc": "Pin a message", "params": { @@ -15165,7 +16836,7 @@ } }, "messages.UploadEncryptedFile": { - "desc": "Upload encrypted file and associate it to a secret chat", + "desc": "Upload encrypted file and associate it to a secret chat (without actually sending it to the chat).", "params": { "file": "The file", "peer": "The secret chat to associate the file to" @@ -15192,7 +16863,6 @@ "messages.ViewSponsoredMessage": { "desc": "Mark a specific sponsored message \u00bb as read", "params": { - "peer": "The channel/bot where the ad is located", "random_id": "The ad's unique ID." } }, @@ -15226,8 +16896,10 @@ } }, "payments.CanPurchaseStore": { - "desc": "", - "params": {} + "desc": "Checks whether a purchase is possible. Must be called before in-store purchase, official apps only.", + "params": { + "purpose": "Payment purpose." + } }, "payments.ChangeStarsSubscription": { "desc": "Activate or deactivate a Telegram Star subscription \u00bb.", @@ -15238,6 +16910,12 @@ "subscription_id": "ID of the subscription." } }, + "payments.CheckCanSendGift": { + "desc": "Check if the specified gift \u00bb can be sent.", + "params": { + "gift_id": "Gift ID." + } + }, "payments.CheckGiftCode": { "desc": "Obtain information about a Telegram Premium giftcode \u00bb", "params": { @@ -15262,8 +16940,28 @@ "payments.ConvertStarGift": { "desc": "Convert a received gift \u00bb into Telegram Stars: this will permanently destroy the gift, converting it into starGift.convert_stars Telegram Stars, added to the user's balance.", "params": { - "msg_id": "The ID of the messageService with the messageActionStarGift.", - "user_id": "ID of the user that sent us the gift." + "stargift": "The gift to convert." + } + }, + "payments.CraftStarGift": { + "desc": "{schema}", + "params": { + "stargift": "" + } + }, + "payments.CreateStarGiftCollection": { + "desc": "Create a star gift collection \u00bb.", + "params": { + "peer": "Peer where to create the collection.", + "stargift": "Gifts added to the collection.", + "title": "Title of the collection." + } + }, + "payments.DeleteStarGiftCollection": { + "desc": "Delete a star gift collection \u00bb.", + "params": { + "collection_id": "ID of the collection.", + "peer": "Peer that owns the collection." } }, "payments.EditConnectedStarRefBot": { @@ -15311,6 +17009,14 @@ "peer": "The affiliated peer" } }, + "payments.GetCraftStarGifts": { + "desc": "{schema}", + "params": { + "gift_id": "", + "limit": "Maximum number of results to return, see pagination", + "offset": "" + } + }, "payments.GetGiveawayInfo": { "desc": "Obtain information about a Telegram Premium giveaway \u00bb.", "params": { @@ -15340,25 +17046,94 @@ "flags": "Flags, see TL conditional fields" } }, + "payments.GetResaleStarGifts": { + "desc": "Get collectible gifts of a specific type currently on resale, see here \u00bb for more info.", + "params": { + "attributes": "Optionally filter gifts with the specified attributes. If no attributes of a specific type are specified, all attributes of that type are allowed.", + "attributes_hash": "If a previous call to the method was made and payments.resaleStarGifts.attributes_hash was set, pass it here to avoid returning any results if they haven't changed. Otherwise, set this flag and pass 0 to return payments.resaleStarGifts.attributes_hash and payments.resaleStarGifts.attributes, these two fields will not be set if this flag is not set.", + "flags": "Flags, see TL conditional fields", + "for_craft": "", + "gift_id": "Mandatory identifier of the base gift from which the collectible gift was upgraded.", + "limit": "Maximum number of results to return, see pagination", + "offset": "Offset for pagination. If not equal to an empty string, payments.resaleStarGifts.counters will not be set to avoid returning the counters every time a new page is fetched.", + "sort_by_num": "Sort gifts by number (ascending).", + "sort_by_price": "Sort gifts by price (ascending).", + "stars_only": "" + } + }, "payments.GetSavedInfo": { "desc": "Get saved payment information", "params": {} }, "payments.GetSavedStarGift": { - "desc": "", - "params": {} + "desc": "Fetch info about specific gifts owned by a peer we control.", + "params": { + "stargift": "List of gifts to fetch info about." + } }, "payments.GetSavedStarGifts": { - "desc": "", - "params": {} + "desc": "Fetch the full list of gifts owned by a peer.", + "params": { + "collection_id": "Only returns gifts within the specified collection \u00bb.", + "exclude_hosted": "", + "exclude_saved": "Exclude gifts pinned on the profile.", + "exclude_unique": "Exclude collectible gifts \u00bb.", + "exclude_unlimited": "Exclude gifts that do not have the starGift.limited flag set.", + "exclude_unsaved": "Exclude gifts not pinned on the profile.", + "exclude_unupgradable": "Exclude gifts that cannot be upgraded to collectible gifts \u00bb.", + "exclude_upgradable": "Exclude gifts that can be upgraded to collectible gifts \u00bb.", + "flags": "Flags, see TL conditional fields", + "limit": "Maximum number of results to return, see pagination", + "offset": "Offset for pagination.", + "peer": "Fetch only gifts owned by the specified peer, such as: a user, with peer=inputPeerUser; a channel, with peer=inputPeerChannel; a connected business user (when executing the method as a bot, over the business connection), with peer=inputPeerUser.", + "peer_color_available": "", + "sort_by_value": "If set, sorts the gifts by price instead of reception date." + } + }, + "payments.GetStarGiftActiveAuctions": { + "desc": "{schema}", + "params": { + "hash": "" + } + }, + "payments.GetStarGiftAuctionAcquiredGifts": { + "desc": "{schema}", + "params": { + "gift_id": "" + } + }, + "payments.GetStarGiftAuctionState": { + "desc": "{schema}", + "params": { + "auction": "", + "version": "" + } + }, + "payments.GetStarGiftCollections": { + "desc": "Fetches all star gift collections \u00bb of a peer.", + "params": { + "hash": "Hash (generated as specified here \u00bb) using the starGiftCollection.hash field (not the collection_id field) of all collections returned by a previous method call, to avoid refetching the result if it hasn't changed.", + "peer": "The peer." + } + }, + "payments.GetStarGiftUpgradeAttributes": { + "desc": "{schema}", + "params": { + "gift_id": "" + } }, "payments.GetStarGiftUpgradePreview": { - "desc": "", - "params": {} + "desc": "Obtain a preview of the possible attributes (chosen randomly) a gift \u00bb can receive after upgrading it to a collectible gift \u00bb, see here \u00bb for more info.", + "params": { + "gift_id": "The gift to upgrade." + } }, "payments.GetStarGiftWithdrawalUrl": { - "desc": "", - "params": {} + "desc": "Convert a collectible gift \u00bb to an NFT on the TON blockchain.", + "params": { + "password": "The current user's 2FA password, passed as specified here \u00bb.", + "stargift": "The collectible gift to export." + } }, "payments.GetStarGifts": { "desc": "Get a list of available gifts, see here \u00bb for more info.", @@ -15388,21 +17163,26 @@ "params": { "dark": "Whether to enable dark theme for graph colors", "flags": "Flags, see TL conditional fields", - "peer": "Get statistics for the specified bot, channel or ourselves (inputPeerSelf)." + "peer": "Get statistics for the specified bot, channel or ourselves (inputPeerSelf).", + "ton": "If set, fetches channel/bot ad revenue statistics in TON." } }, "payments.GetStarsRevenueWithdrawalUrl": { "desc": "Withdraw funds from a channel or bot's star balance \u00bb.", "params": { + "amount": "The amount of stars or nanotons to withdraw.", + "flags": "Flags, see TL conditional fields", "password": "2FA password, see here \u00bb for more info.", "peer": "Channel or bot from which to withdraw funds.", - "stars": "Amount of stars to withdraw." + "ton": "If set, withdraws channel/ad revenue in TON." } }, "payments.GetStarsStatus": { "desc": "Get the current Telegram Stars balance of the current account (with peer=inputPeerSelf), or the stars balance of the bot specified in peer.", "params": { - "peer": "Peer of which to get the balance." + "flags": "Flags, see TL conditional fields", + "peer": "Peer of which to get the balance.", + "ton": "If set, returns the channel/ad revenue balance in nanotons." } }, "payments.GetStarsSubscriptions": { @@ -15428,14 +17208,17 @@ "offset": "Offset for pagination, obtained from the returned next_offset, initially an empty string \u00bb.", "outbound": "If set, fetches only outgoing transactions.", "peer": "Fetch the transaction history of the peer (inputPeerSelf or a bot we own).", - "subscription_id": "If set, fetches only transactions for the specified Telegram Star subscription \u00bb." + "subscription_id": "If set, fetches only transactions for the specified Telegram Star subscription \u00bb.", + "ton": "If set, returns the channel/ad revenue transactions in nanotons, instead." } }, "payments.GetStarsTransactionsByID": { "desc": "Obtain info about Telegram Star transactions \u00bb using specific transaction IDs.", "params": { + "flags": "Flags, see TL conditional fields", "id": "Transaction IDs.", - "peer": "Channel or bot." + "peer": "Channel or bot.", + "ton": "If set, returns channel/bot ad revenue transactions in nanotons." } }, "payments.GetSuggestedStarRefBots": { @@ -15450,8 +17233,16 @@ } }, "payments.GetUniqueStarGift": { - "desc": "", - "params": {} + "desc": "Obtain info about a collectible gift \u00bb using a slug obtained from a collectible gift link \u00bb.", + "params": { + "slug": "The slug." + } + }, + "payments.GetUniqueStarGiftValueInfo": { + "desc": "Get information about the value of a collectible gift \u00bb.", + "params": { + "slug": "slug from a starGiftUnique." + } }, "payments.LaunchPrepaidGiveaway": { "desc": "Launch a prepaid giveaway \u00bb.", @@ -15468,13 +17259,27 @@ "user_id": "User to refund." } }, + "payments.ReorderStarGiftCollections": { + "desc": "Reorder the star gift collections \u00bb on an owned peer's profile.", + "params": { + "order": "New collection order.", + "peer": "The owned peer." + } + }, + "payments.ResolveStarGiftOffer": { + "desc": "{schema}", + "params": { + "decline": "", + "flags": "Flags, see TL conditional fields", + "offer_msg_id": "" + } + }, "payments.SaveStarGift": { "desc": "Display or remove a received gift \u00bb from our profile.", "params": { "flags": "Flags, see TL conditional fields", - "msg_id": "The ID of the messageService with the messageActionStarGift.", - "unsave": "If set, hides the gift from our profile.", - "user_id": "ID of the user that sent us the gift." + "stargift": "The gift to display or remove.", + "unsave": "If set, hides the gift from our profile." } }, "payments.SendPaymentForm": { @@ -15489,6 +17294,18 @@ "tip_amount": "Tip, in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)." } }, + "payments.SendStarGiftOffer": { + "desc": "{schema}", + "params": { + "allow_paid_stars": "", + "duration": "", + "flags": "Flags, see TL conditional fields", + "peer": "", + "price": "", + "random_id": "", + "slug": "" + } + }, "payments.SendStarsForm": { "desc": "Make a payment using Telegram Stars, see here \u00bb for more info.", "params": { @@ -15497,20 +17314,53 @@ } }, "payments.ToggleChatStarGiftNotifications": { - "desc": "", - "params": {} + "desc": "Enables or disables the reception of notifications every time a gift \u00bb is received by the specified channel, can only be invoked by admins with post_messages admin rights.", + "params": { + "enabled": "Whether to enable or disable reception of notifications in the form of messageActionStarGiftUnique and messageActionStarGift service messages from the channel.", + "flags": "Flags, see TL conditional fields", + "peer": "The channel for which to receive or not receive notifications." + } }, "payments.ToggleStarGiftsPinnedToTop": { - "desc": "", - "params": {} + "desc": "Pins a received gift on top of the profile of the user or owned channels by using payments.toggleStarGiftsPinnedToTop.", + "params": { + "peer": "The peer where to pin the gift.", + "stargift": "The gift to pin." + } }, "payments.TransferStarGift": { - "desc": "", - "params": {} + "desc": "Transfer a collectible gift to another user or channel: can only be used if transfer is free (i.e. messageActionStarGiftUnique.transfer_stars is not set); see here \u00bb for more info on the full flow (including the different flow to use in case the transfer isn't free).", + "params": { + "stargift": "The gift to transfer.", + "to_id": "Destination peer." + } + }, + "payments.UpdateStarGiftCollection": { + "desc": "Add or remove gifts from a star gift collection \u00bb, or rename the collection.", + "params": { + "add_stargift": "Can contain a list of gifts to add to the collection.", + "collection_id": "Collection ID.", + "delete_stargift": "Can contain a list of gifts to remove from the collection.", + "flags": "Flags, see TL conditional fields", + "order": "Can contain the new gift order.", + "peer": "Peer that owns the collection.", + "title": "Title of the collection, to rename the collection." + } + }, + "payments.UpdateStarGiftPrice": { + "desc": "A collectible gift we own \u00bb can be put up for sale on the gift marketplace \u00bb with this method, see here \u00bb for more info.", + "params": { + "resell_amount": "Resale price of the gift.", + "stargift": "The gift to resell." + } }, "payments.UpgradeStarGift": { - "desc": "", - "params": {} + "desc": "Upgrade a gift to a collectible gift: can only be used if the upgrade was already paid by the gift sender; see here \u00bb for more info on the full flow (including the different flow to use in case the upgrade was not paid by the gift sender).", + "params": { + "flags": "Flags, see TL conditional fields", + "keep_original_details": "Set this flag to keep the original gift text, sender and receiver in the upgraded gift as a starGiftAttributeOriginalDetails attribute.", + "stargift": "The gift to upgrade" + } }, "payments.ValidateRequestedInfo": { "desc": "Submit requested order information for validation", @@ -15546,8 +17396,17 @@ } }, "phone.CreateConferenceCall": { - "desc": "", - "params": {} + "desc": "Create and optionally join a new conference call.", + "params": { + "block": "Initial blockchain block (can only be used if join is set).", + "flags": "Flags, see TL conditional fields", + "join": "If set, also join the call, otherwise just create the call link.", + "muted": "If set, mute our microphone when joining the call (can only be used if join is set).", + "params": "Parameters from tgcalls (can only be used if join is set).", + "public_key": "Public key (can only be used if join is set).", + "random_id": "Unique client message ID required to prevent creation of duplicate group calls.", + "video_stopped": "If set, our video stream is disabled (can only be used if join is set)." + } }, "phone.CreateGroupCall": { "desc": "Create a group call or livestream", @@ -15560,6 +17419,41 @@ "title": "Call title" } }, + "phone.DeclineConferenceCallInvite": { + "desc": "Declines a conference call invite.", + "params": { + "msg_id": "The ID of the messageActionConferenceCall to decline." + } + }, + "phone.DeleteConferenceCallParticipants": { + "desc": "Remove participants from a conference call.", + "params": { + "block": "The block containing an appropriate e2e.chain.changeSetGroupState event", + "call": "The conference call.", + "flags": "Flags, see TL conditional fields", + "ids": "IDs of users to remove.", + "kick": "Whether this is a forced removal of active members in a conference call.", + "only_left": "Whether this is a removal of members that already left the conference call." + } + }, + "phone.DeleteGroupCallMessages": { + "desc": "{schema}", + "params": { + "call": "", + "flags": "Flags, see TL conditional fields", + "messages": "", + "report_spam": "" + } + }, + "phone.DeleteGroupCallParticipantMessages": { + "desc": "{schema}", + "params": { + "call": "", + "flags": "Flags, see TL conditional fields", + "participant": "", + "report_spam": "" + } + }, "phone.DiscardCall": { "desc": "Refuse or end running call", "params": { @@ -15617,12 +17511,27 @@ "limit": "Maximum number of results to return, see pagination" } }, + "phone.GetGroupCallChainBlocks": { + "desc": "Fetch the blocks of a conference blockchain \u00bb.", + "params": { + "call": "The conference.", + "limit": "Maximum number of blocks to return in this call, see pagination", + "offset": "Offset for pagination.", + "sub_chain_id": "Subchain ID." + } + }, "phone.GetGroupCallJoinAs": { "desc": "Get a list of peers that can be used to join a group call, presenting yourself as a specific user/channel.", "params": { "peer": "The dialog whose group call or livestream we're trying to join" } }, + "phone.GetGroupCallStars": { + "desc": "{schema}", + "params": { + "call": "" + } + }, "phone.GetGroupCallStreamChannels": { "desc": "Get info about RTMP streams in a group call or livestream.\nThis method should be invoked to the same group/channel-related DC used for downloading livestream chunks.\nAs usual, the media DC is preferred, if available.", "params": { @@ -15632,6 +17541,8 @@ "phone.GetGroupCallStreamRtmpUrl": { "desc": "Get RTMP URL and stream key for RTMP livestreams. Can be used even before creating the actual RTMP livestream with phone.createGroupCall (the rtmp_stream flag must be set).", "params": { + "flags": "Flags, see TL conditional fields", + "live_story": "", "peer": "Peer to livestream into", "revoke": "Whether to revoke the previous stream key or simply return the existing one" } @@ -15646,6 +17557,15 @@ "sources": "If specified, will fetch group participant info about the specified WebRTC source IDs" } }, + "phone.InviteConferenceCallParticipant": { + "desc": "Invite a user to a conference call.", + "params": { + "call": "The conference call.", + "flags": "Flags, see TL conditional fields", + "user_id": "The user to invite.", + "video": "Invite the user to also turn on their video feed." + } + }, "phone.InviteToGroupCall": { "desc": "Invite a set of users to a group call.", "params": { @@ -15656,12 +17576,14 @@ "phone.JoinGroupCall": { "desc": "Join a group call", "params": { + "block": "The block containing an appropriate e2e.chain.changeSetGroupState event.", "call": "The group call", "flags": "Flags, see TL conditional fields", "invite_hash": "The invitation hash from the invite link \u00bb, if provided allows speaking in a livestream or muted group chat.", "join_as": "Join the group call, presenting yourself as the specified user/channel", "muted": "If set, the user will be muted by default upon joining.", "params": "WebRTC parameters", + "public_key": "For conference calls, your public key.", "video_stopped": "If set, the user's video will be disabled by default upon joining." } }, @@ -15723,6 +17645,38 @@ "peer": "The dialog" } }, + "phone.SaveDefaultSendAs": { + "desc": "{schema}", + "params": { + "call": "", + "send_as": "" + } + }, + "phone.SendConferenceCallBroadcast": { + "desc": "Broadcast a blockchain block to all members of a conference call, see here \u00bb for more info.", + "params": { + "block": "The block to broadcast.", + "call": "The conference where to broadcast the block." + } + }, + "phone.SendGroupCallEncryptedMessage": { + "desc": "{schema}", + "params": { + "call": "", + "encrypted_message": "" + } + }, + "phone.SendGroupCallMessage": { + "desc": "{schema}", + "params": { + "allow_paid_stars": "", + "call": "", + "flags": "Flags, see TL conditional fields", + "message": "", + "random_id": "", + "send_as": "" + } + }, "phone.SendSignalingData": { "desc": "Send VoIP signaling data", "params": { @@ -15763,7 +17717,9 @@ "call": "Group call", "flags": "Flags, see TL conditional fields", "join_muted": "Whether all users will that join this group call are muted by default upon joining the group call", - "reset_invite_hash": "Invalidate existing invite links" + "messages_enabled": "", + "reset_invite_hash": "Invalidate existing invite links", + "send_paid_messages_stars": "" } }, "phone.ToggleGroupCallStartSubscription": { @@ -15802,7 +17758,7 @@ "params": { "file": "Profile photo", "flags": "Flags, see TL conditional fields", - "save": "If set, removes a previously set personal profile picture (does not affect suggested profile pictures, to remove them simply deleted the messageActionSuggestProfilePhoto service message with messages.deleteMessages).", + "save": "If set, removes a previously set personal profile picture (does not affect suggested profile pictures, to remove them simply delete the messageActionSuggestProfilePhoto service message with messages.deleteMessages).", "suggest": "If set, will send a messageActionSuggestProfilePhoto service message to user_id, suggesting them to use the specified profile picture; otherwise, will set a personal profile picture for the user (only visible to the current user).", "user_id": "The contact", "video": "Animated profile picture video", @@ -15894,29 +17850,6 @@ "flags": "Flags, see TL conditional fields" } }, - "stats.GetBroadcastRevenueStats": { - "desc": "Get channel ad revenue statistics \u00bb.", - "params": { - "dark": "Whether to enable dark theme for graph colors", - "flags": "Flags, see TL conditional fields", - "peer": "Get ad revenue stats for the specified channel or bot" - } - }, - "stats.GetBroadcastRevenueTransactions": { - "desc": "Fetch channel ad revenue transaction history \u00bb.", - "params": { - "limit": "Maximum number of results to return, see pagination", - "offset": "Offset for pagination", - "peer": "Get ad revenue transactions for the specified channel or bot" - } - }, - "stats.GetBroadcastRevenueWithdrawalUrl": { - "desc": "Withdraw funds from a channel's ad revenue balance \u00bb.", - "params": { - "password": "2FA password, see here \u00bb for more info.", - "peer": "Get ad revenue withdrawal URL for the specified channel or bot" - } - }, "stats.GetBroadcastStats": { "desc": "Get channel statistics", "params": { @@ -16077,6 +18010,21 @@ "peer": "The peer from which we wish to post stories." } }, + "stories.CreateAlbum": { + "desc": "Creates a story album.", + "params": { + "peer": "The owned peer where to create the album.", + "stories": "Stories to add to the album.", + "title": "Album name." + } + }, + "stories.DeleteAlbum": { + "desc": "Delete a story album.", + "params": { + "album_id": "ID of the album to delete.", + "peer": "Owned peer where the album is located." + } + }, "stories.DeleteStories": { "desc": "Deletes some posted stories.", "params": { @@ -16104,6 +18052,22 @@ "peer": "Peer where the story was posted" } }, + "stories.GetAlbumStories": { + "desc": "Get stories in a story album \u00bb.", + "params": { + "album_id": "ID of the album.", + "limit": "Maximum number of results to return, see pagination", + "offset": "Offset for pagination.", + "peer": "Peer where the album is posted." + } + }, + "stories.GetAlbums": { + "desc": "Get story albums created by a peer.", + "params": { + "hash": "The hash from a previously returned stories.albums, to avoid returning any results if they haven't changed.", + "peer": "The peer." + } + }, "stories.GetAllReadPeerStories": { "desc": "Obtain the latest read story ID for all peers when first logging in, returned as a list of updateReadStories updates, see here \u00bb for more info.", "params": {} @@ -16203,6 +18167,13 @@ "peer": "The peer whose stories should be marked as read." } }, + "stories.ReorderAlbums": { + "desc": "Reorder story albums on a profile \u00bb.", + "params": { + "order": "New order of the albums.", + "peer": "Peer where the albums are located." + } + }, "stories.Report": { "desc": "Report a story.", "params": { @@ -16236,6 +18207,7 @@ "stories.SendStory": { "desc": "Uploads a Telegram Story.", "params": { + "albums": "If set, adds the story to the specified albums.", "caption": "Story caption.", "entities": "Message entities for styled text, if allowed by the stories_entities client configuration parameter \u00bb.", "flags": "Flags, see TL conditional fields", @@ -16252,6 +18224,22 @@ "random_id": "Unique client message ID required to prevent message resending." } }, + "stories.StartLive": { + "desc": "{schema}", + "params": { + "caption": "", + "entities": "Message entities for styled text", + "flags": "Flags, see TL conditional fields", + "messages_enabled": "", + "noforwards": "", + "peer": "", + "pinned": "", + "privacy_rules": "", + "random_id": "", + "rtmp_stream": "", + "send_paid_messages_stars": "" + } + }, "stories.ToggleAllStoriesHidden": { "desc": "Hide the active stories of a specific peer, preventing them from being displayed on the action bar on the homescreen.", "params": { @@ -16280,6 +18268,18 @@ "peer": "Peer where to pin stories." } }, + "stories.UpdateAlbum": { + "desc": "Rename a story albums \u00bb, or add, delete or reorder stories in it.", + "params": { + "add_stories": "If set, adds the specified stories to the album.", + "album_id": "Album ID.", + "delete_stories": "If set, deletes the specified stories from the album.", + "flags": "Flags, see TL conditional fields", + "order": "If set, reorders the stories in the album by their IDs.", + "peer": "Peer where the album is posted.", + "title": "New album title." + } + }, "updates.GetChannelDifference": { "desc": "Returns the difference between the current state of updates of a certain channel and transmitted.", "params": { @@ -16379,8 +18379,26 @@ } }, "users.GetRequirementsToContact": { - "desc": "", - "params": {} + "desc": "Check whether we can write to the specified users, used to implement bulk checks for Premium-only messages \u00bb and paid messages \u00bb.", + "params": { + "id": "Users to check." + } + }, + "users.GetSavedMusic": { + "desc": "Get songs pinned to the user's profile, see here \u00bb for more info.", + "params": { + "hash": "Hash \u00bb of the IDs of previously added songs, to avoid returning any result if there was no change.", + "id": "The ID of the user.", + "limit": "Maximum number of results to return, see pagination", + "offset": "Offset for pagination." + } + }, + "users.GetSavedMusicByID": { + "desc": "Check if the passed songs are still pinned to the user's profile, or refresh the file references of songs pinned on a user's profile see here \u00bb for more info.", + "params": { + "documents": "The songs (here, file_reference can be empty to refresh file references).", + "id": "The ID of the user." + } }, "users.GetUsers": { "desc": "Returns basic user info according to their identifiers.", @@ -16394,6 +18412,13 @@ "errors": "Errors", "id": "The user" } + }, + "users.SuggestBirthday": { + "desc": "{schema}", + "params": { + "birthday": "", + "id": "" + } } }, "type": { @@ -16418,6 +18443,9 @@ "AttachMenuPeerType": { "desc": "Indicates a supported peer type for a bot mini app attachment menu" }, + "AuctionBidLevel": { + "desc": "" + }, "Authorization": { "desc": "Represents a logged-in session" }, @@ -16482,16 +18510,10 @@ "desc": "Represents a Main Mini App preview media, see here \u00bb for more info." }, "BotVerification": { - "desc": "" + "desc": "Describes a bot verification icon \u00bb." }, "BotVerifierSettings": { - "desc": "" - }, - "BroadcastRevenueBalances": { - "desc": "Channel ad revenue balance \u00bb information." - }, - "BroadcastRevenueTransaction": { - "desc": "A channel ad revenue \u00bb transaction." + "desc": "Info about the current verifier bot \u00bb." }, "BusinessAwayMessage": { "desc": "Describes a Telegram Business away message, automatically sent to users writing to us when we're offline, during closing hours, while we're on vacation, or in some other custom time period when we cannot immediately answer to the user." @@ -16503,7 +18525,7 @@ "desc": "Specifies the private chats that a connected business bot \u00bb may receive messages and interact with." }, "BusinessBotRights": { - "desc": "" + "desc": "Business bot rights." }, "BusinessChatLink": { "desc": "Contains info about a business chat deep link \u00bb created by the current account." @@ -16589,6 +18611,9 @@ "ChatReactions": { "desc": "Available chat reactions" }, + "ChatTheme": { + "desc": "A chat theme" + }, "CodeSettings": { "desc": "Settings for the code type to send" }, @@ -16632,7 +18657,7 @@ "desc": "Peer, or all peers in a folder" }, "DisallowedGiftsSettings": { - "desc": "" + "desc": "Disallow the reception of specific gift types." }, "Document": { "desc": "A document." @@ -16727,6 +18752,12 @@ "GroupCall": { "desc": "A group call" }, + "GroupCallDonor": { + "desc": "" + }, + "GroupCallMessage": { + "desc": "" + }, "GroupCallParticipant": { "desc": "Info about a group call participant" }, @@ -16793,6 +18824,9 @@ "InputChatPhoto": { "desc": "Defines a new group profile photo." }, + "InputChatTheme": { + "desc": "Specifies a chat theme \u00bb." + }, "InputChatlist": { "desc": "Represents a folder" }, @@ -16850,6 +18884,12 @@ "InputNotifyPeer": { "desc": "Object defines the set of users and/or groups that generate notifications." }, + "InputPasskeyCredential": { + "desc": "" + }, + "InputPasskeyResponse": { + "desc": "" + }, "InputPaymentCredentials": { "desc": "Payment credentials" }, @@ -16878,7 +18918,7 @@ "desc": "Contains info about a message or story to reply to." }, "InputSavedStarGift": { - "desc": "" + "desc": "Points to a gift \u00bb." }, "InputSecureFile": { "desc": "Secure passport file, for more info see the passport docs \u00bb" @@ -16889,6 +18929,9 @@ "InputSingleMedia": { "desc": "A single media in an album or grouped media sent with messages.sendMultiMedia." }, + "InputStarGiftAuction": { + "desc": "" + }, "InputStarsTransaction": { "desc": "Used to fetch info about a Telegram Star transaction \u00bb." }, @@ -16937,6 +18980,9 @@ "KeyboardButtonRow": { "desc": "Bot or inline keyboard rows" }, + "KeyboardButtonStyle": { + "desc": "" + }, "LabeledPrice": { "desc": "Labeled pricetag" }, @@ -16956,7 +19002,7 @@ "desc": "Represents a story media area \u00bb" }, "MediaAreaCoordinates": { - "desc": "Coordinates and size of a clicable rectangular area on top of a story." + "desc": "Coordinates and size of a clickable rectangular area on top of a story." }, "Message": { "desc": "Object describing a message." @@ -17049,6 +19095,9 @@ "desc": "Table row" }, "PaidReactionPrivacy": { + "desc": "Paid reaction privacy settings \u00bb" + }, + "Passkey": { "desc": "" }, "PasswordKdfAlgo": { @@ -17087,6 +19136,9 @@ "PeerStories": { "desc": "Stories associated to a peer" }, + "PendingSuggestion": { + "desc": "Represents a custom pending suggestion \u00bb." + }, "PhoneCall": { "desc": "Phone call" }, @@ -17141,6 +19193,9 @@ "PrivacyRule": { "desc": "Privacy rules together with privacy keys indicate what can or can't someone do and are specified by a PrivacyRule constructor, and its input counterpart InputPrivacyRule." }, + "ProfileTab": { + "desc": "Represents a tab of a profile page \u00bb." + }, "PublicForward": { "desc": "Contains info about the forwards of a story as a message to public chats and reposts by public channels." }, @@ -17168,6 +19223,9 @@ "RecentMeUrl": { "desc": "Recent t.me urls" }, + "RecentStory": { + "desc": "" + }, "ReplyMarkup": { "desc": "Reply markup for bot and inline keyboards" }, @@ -17184,7 +19242,7 @@ "desc": "Info about a peer, shared by a user with the currently logged in bot using messages.sendBotRequestedPeer." }, "RequirementToContact": { - "desc": "" + "desc": "Specifies a requirement that must be satisfied in order to contact a user." }, "RestrictionReason": { "desc": "Restriction reason" @@ -17202,7 +19260,10 @@ "desc": "Info about a saved message reaction tag \u00bb." }, "SavedStarGift": { - "desc": "" + "desc": "Represents a gift owned by a peer." + }, + "SearchPostsFlood": { + "desc": "Indicates if the specified global post search \u00bb requires payment." }, "SearchResultsCalendarPeriod": { "desc": "Information about found messages sent on a specific day, used to split the messages in messages.searchResultsCalendar constructors by days." @@ -17262,12 +19323,45 @@ "desc": "A report option for a sponsored message \u00bb." }, "SponsoredPeer": { - "desc": "" + "desc": "A sponsored peer." }, "StarGift": { "desc": "Represents a star gift, see here \u00bb for more info." }, + "StarGiftActiveAuctionState": { + "desc": "" + }, "StarGiftAttribute": { + "desc": "An attribute of a collectible gift \u00bb." + }, + "StarGiftAttributeCounter": { + "desc": "Indicates the total number of gifts that have the specified attribute." + }, + "StarGiftAttributeId": { + "desc": "Represents the identifier of a collectible gift attribute." + }, + "StarGiftAttributeRarity": { + "desc": "" + }, + "StarGiftAuctionAcquiredGift": { + "desc": "" + }, + "StarGiftAuctionRound": { + "desc": "" + }, + "StarGiftAuctionState": { + "desc": "" + }, + "StarGiftAuctionUserState": { + "desc": "" + }, + "StarGiftBackground": { + "desc": "" + }, + "StarGiftCollection": { + "desc": "Represents a star gift collection \u00bb." + }, + "StarGiftUpgradePrice": { "desc": "" }, "StarRefProgram": { @@ -17285,6 +19379,9 @@ "StarsGiveawayWinnersOption": { "desc": "Represents a possible option for the number of winners in a star giveaway" }, + "StarsRating": { + "desc": "Represents the profile's star rating, see here \u00bb for more info." + }, "StarsRevenueStatus": { "desc": "Describes Telegram Star revenue balances \u00bb." }, @@ -17342,6 +19439,9 @@ "StoriesStealthMode": { "desc": "Story stealth mode status" }, + "StoryAlbum": { + "desc": "Represents a story album \u00bb." + }, "StoryFwdHeader": { "desc": "Contains info about the original poster of a reposted story." }, @@ -17357,6 +19457,9 @@ "StoryViews": { "desc": "Aggregated view and reaction information of a story" }, + "SuggestedPost": { + "desc": "Contains info about a suggested post \u00bb." + }, "TextWithEntities": { "desc": "Styled text with message entities" }, @@ -17369,6 +19472,15 @@ "Timezone": { "desc": "Timezone information." }, + "TodoCompletion": { + "desc": "A completed todo list \u00bb item." + }, + "TodoItem": { + "desc": "An item of a todo list \u00bb." + }, + "TodoList": { + "desc": "Represents a todo list \u00bb." + }, "TopPeer": { "desc": "Top peer" }, @@ -17447,6 +19559,9 @@ "account.BusinessChatLinks": { "desc": "Contains info about business chat deep links \u00bb created by the current account." }, + "account.ChatThemes": { + "desc": "Available chat themes" + }, "account.ConnectedBots": { "desc": "Info about currently connected business bots." }, @@ -17460,6 +19575,12 @@ "desc": "A list of emoji statuses" }, "account.PaidMessagesRevenue": { + "desc": "Total number of non-refunded Telegram Stars a user has spent on sending us messages either directly or through a channel, see here \u00bb for more info on paid messages." + }, + "account.PasskeyRegistrationOptions": { + "desc": "" + }, + "account.Passkeys": { "desc": "" }, "account.Password": { @@ -17480,6 +19601,9 @@ "account.ResolvedBusinessChatLinks": { "desc": "Contains info about a single resolved business chat deep link \u00bb." }, + "account.SavedMusicIds": { + "desc": "List of IDs of songs (document.ids) currently pinned on our profile, see here \u00bb for more info." + }, "account.SavedRingtone": { "desc": "Contains information about a saved notification sound" }, @@ -17519,6 +19643,9 @@ "auth.LoginToken": { "desc": "Login token (for QR code login)" }, + "auth.PasskeyLoginOptions": { + "desc": "" + }, "auth.PasswordRecovery": { "desc": "Recovery info of a 2FA password, only for accounts with a recovery email configured." }, @@ -17583,7 +19710,7 @@ "desc": "Peer returned after resolving a @username" }, "contacts.SponsoredPeers": { - "desc": "" + "desc": "A list of sponsored peers." }, "contacts.TopPeers": { "desc": "Top peers" @@ -17717,6 +19844,12 @@ "messages.DiscussionMessage": { "desc": "Info about a message thread" }, + "messages.EmojiGameInfo": { + "desc": "" + }, + "messages.EmojiGameOutcome": { + "desc": "" + }, "messages.EmojiGroups": { "desc": "Represents a list of emoji categories." }, @@ -17835,11 +19968,14 @@ "desc": "Contains an instant view webpage." }, "messages.WebPagePreview": { - "desc": "" + "desc": "Represents a webpage preview." }, "payments.BankCardData": { "desc": "Credit card info, provided by the card's bank(s)" }, + "payments.CheckCanSendGiftResult": { + "desc": "Specifies if a gift can or cannot be sent." + }, "payments.CheckedGiftCode": { "desc": "Info about a Telegram Premium Giftcode." }, @@ -17861,18 +19997,36 @@ "payments.PaymentResult": { "desc": "Payment result" }, + "payments.ResaleStarGifts": { + "desc": "List of gifts currently on resale \u00bb." + }, "payments.SavedInfo": { "desc": "Saved payment info" }, "payments.SavedStarGifts": { + "desc": "Represents a list of gifts." + }, + "payments.StarGiftActiveAuctions": { "desc": "" }, - "payments.StarGiftUpgradePreview": { + "payments.StarGiftAuctionAcquiredGifts": { "desc": "" }, - "payments.StarGiftWithdrawalUrl": { + "payments.StarGiftAuctionState": { + "desc": "" + }, + "payments.StarGiftCollections": { + "desc": "Represents a list of star gift collections \u00bb." + }, + "payments.StarGiftUpgradeAttributes": { "desc": "" }, + "payments.StarGiftUpgradePreview": { + "desc": "A preview of the possible attributes (chosen randomly) a gift \u00bb can receive after upgrading it to a collectible gift \u00bb, see here \u00bb for more info." + }, + "payments.StarGiftWithdrawalUrl": { + "desc": "A URL that can be used to import the exported NFT on Fragment." + }, "payments.StarGifts": { "desc": "Available gifts \u00bb." }, @@ -17892,7 +20046,10 @@ "desc": "A list of suggested mini apps with available affiliate programs" }, "payments.UniqueStarGift": { - "desc": "" + "desc": "Represents a collectible gift \u00bb." + }, + "payments.UniqueStarGiftValueInfo": { + "desc": "Information about the value of a collectible gift \u00bb." }, "payments.ValidatedRequestedInfo": { "desc": "Validated requested info" @@ -17903,6 +20060,9 @@ "phone.GroupCall": { "desc": "Contains info about a group call, and partial info about its participants." }, + "phone.GroupCallStars": { + "desc": "" + }, "phone.GroupCallStreamChannels": { "desc": "Info about RTMP streams in a group call or livestream" }, @@ -17939,15 +20099,6 @@ "smsjobs.Status": { "desc": "Status" }, - "stats.BroadcastRevenueStats": { - "desc": "Channel revenue ad statistics, see here \u00bb for more info." - }, - "stats.BroadcastRevenueTransactions": { - "desc": "Channel ad revenue transactions \u00bb." - }, - "stats.BroadcastRevenueWithdrawalUrl": { - "desc": "Contains the URL to use to withdraw channel ad revenue." - }, "stats.BroadcastStats": { "desc": "Channel statistics" }, @@ -17969,9 +20120,15 @@ "storage.FileType": { "desc": "Object describes the file type." }, + "stories.Albums": { + "desc": "Represents a list of story albums \u00bb." + }, "stories.AllStories": { "desc": "Full list of active (or active and hidden) stories." }, + "stories.CanSendStoryCount": { + "desc": "Contains the number of available active story slots (equal to the value of the story_expiring_limit_* client configuration parameter minus the number of currently active stories)." + }, "stories.FoundStories": { "desc": "Stories found using global story search \u00bb." }, @@ -18008,11 +20165,14 @@ "upload.WebFile": { "desc": "Remote file" }, + "users.SavedMusic": { + "desc": "List of songs (document.ids) currently pinned on a user's profile, see here \u00bb for more info." + }, "users.UserFull": { "desc": "Full user information, with attached context peers for reactions" }, "users.Users": { - "desc": "" + "desc": "Describes a list of users (or bots)." } } } diff --git a/hydrogram/methods/messages/copy_media_group.py b/hydrogram/methods/messages/copy_media_group.py index de721f384..4e40b06c6 100644 --- a/hydrogram/methods/messages/copy_media_group.py +++ b/hydrogram/methods/messages/copy_media_group.py @@ -162,6 +162,7 @@ async def copy_media_group( r.updates, ) ], + topics=r.topics, users=r.users, chats=r.chats, ), diff --git a/hydrogram/methods/messages/send_media_group.py b/hydrogram/methods/messages/send_media_group.py index 28bc15544..f7787c49b 100644 --- a/hydrogram/methods/messages/send_media_group.py +++ b/hydrogram/methods/messages/send_media_group.py @@ -447,6 +447,7 @@ async def send_media_group( r.updates, ) ], + topics=r.topics, users=r.users, chats=r.chats, ), diff --git a/hydrogram/methods/phone/create_video_chat.py b/hydrogram/methods/phone/create_video_chat.py index 5f0fcdbc5..8e1a949ef 100644 --- a/hydrogram/methods/phone/create_video_chat.py +++ b/hydrogram/methods/phone/create_video_chat.py @@ -88,10 +88,10 @@ async def create_video_chat( ), ): return await types.Message._parse( - self, - i.message, - {i.id: i for i in r.users}, - {i.id: i for i in r.chats}, + client=self, + message=i.message, + users={i.id: i for i in r.users}, + chats={i.id: i for i in r.chats}, is_scheduled=isinstance(i, raw.types.UpdateNewScheduledMessage), ) return None diff --git a/hydrogram/methods/phone/discard_group_call.py b/hydrogram/methods/phone/discard_group_call.py index 64b8ba532..733077e5e 100644 --- a/hydrogram/methods/phone/discard_group_call.py +++ b/hydrogram/methods/phone/discard_group_call.py @@ -70,10 +70,10 @@ async def discard_group_call( ), ): return await types.Message._parse( - self, - i.message, - {i.id: i for i in r.users}, - {i.id: i for i in r.chats}, + client=self, + message=i.message, + users={i.id: i for i in r.users}, + chats={i.id: i for i in r.chats}, is_scheduled=isinstance(i, raw.types.UpdateNewScheduledMessage), ) return None diff --git a/hydrogram/methods/phone/invite_group_call_members.py b/hydrogram/methods/phone/invite_group_call_members.py index 9769b5b22..5096b938f 100644 --- a/hydrogram/methods/phone/invite_group_call_members.py +++ b/hydrogram/methods/phone/invite_group_call_members.py @@ -82,10 +82,10 @@ async def invite_group_call_members( ), ): return await types.Message._parse( - self, - i.message, - {i.id: i for i in r.users}, - {i.id: i for i in r.chats}, + client=self, + message=i.message, + users={i.id: i for i in r.users}, + chats={i.id: i for i in r.chats}, is_scheduled=isinstance(i, raw.types.UpdateNewScheduledMessage), ) return None