From b4f6581e59c77b061bd7f8588a4d44367b8835a0 Mon Sep 17 00:00:00 2001
From: nick <64551534+null-nick@users.noreply.github.com>
Date: Tue, 10 Sep 2024 19:07:56 +0200
Subject: [PATCH 01/78] Added publish on PyPi (#27)
---
.github/workflows/publish.yaml | 51 ++++++++++++++++++++++++++++++++++
setup.py | 22 +++++++--------
2 files changed, 62 insertions(+), 11 deletions(-)
create mode 100644 .github/workflows/publish.yaml
diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml
new file mode 100644
index 00000000..cf0d03a9
--- /dev/null
+++ b/.github/workflows/publish.yaml
@@ -0,0 +1,51 @@
+# This is the workflow to make and push wheels to PyPi
+
+name: Build Wheels
+on:
+ workflow_dispatch:
+ inputs:
+ publish:
+ description: 'Publish to PyPi'
+ required: false
+ default: false
+ type: boolean
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ permissions:
+ id-token: write
+
+ steps:
+ - name: Check out the repo
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: 3.12
+
+ - name: Install dependencies
+ run: python3.12 -m pip install --upgrade pip setuptools wheel
+
+ - name: Create wheels directory
+ run: mkdir -p wheels
+
+ - name: Build wheel
+ run: python3.12 -m pip wheel . --no-deps --wheel-dir wheels
+
+ - name: List wheel contents
+ run: ls -l wheels
+
+ - uses: actions/upload-artifact@v4
+ with:
+ name: program-mod-wheel
+ path: ./wheels/Pyrogram_Mod*.whl
+ if-no-files-found: error
+
+ - name: Publish a Python distribution to PyPI
+ if: github.event.inputs.publish == 'true'
+ uses: pypa/gh-action-pypi-publish@release/v1
+ with:
+ skip-existing: true
+ packages-dir: wheels/
diff --git a/setup.py b/setup.py
index 7bc105e1..b9f6bd7a 100644
--- a/setup.py
+++ b/setup.py
@@ -14,7 +14,7 @@
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
-# along with Pyrogram. If not, see .
+# along with Pyrogram. If not, see .
import re
from sys import argv
@@ -38,15 +38,15 @@
errors_compiler.start()
setup(
- name="Pyrogram",
+ name="Pyrogram-Mod",
version=version,
- description="Elegant, modern and asynchronous Telegram MTProto API framework in Python for users and bots",
+ description="Modified version of the Pyrogram Telegram MTProto API framework in Python for users and bots.",
long_description=readme,
long_description_content_type="text/markdown",
- url="https://github.com/pyrogram",
- download_url="https://github.com/pyrogram/pyrogram/releases/latest",
- author="Dan",
- author_email="dan@pyrogram.org",
+ url="https://github.com/PyrogramMod/PyrogramMod",
+ download_url="https://github.com/PyrogramMod/PyrogramMod/releases/latest",
+ author="Dan (original author), PyrogramMod (Fork Maintainer)",
+ author_email="",
license="LGPLv3",
classifiers=[
"Development Status :: 5 - Production/Stable",
@@ -73,10 +73,10 @@
],
keywords="telegram chat messenger mtproto api client library python",
project_urls={
- "Tracker": "https://github.com/pyrogram/pyrogram/issues",
- "Community": "https://t.me/pyrogram",
- "Source": "https://github.com/pyrogram/pyrogram",
- "Documentation": "https://docs.pyrogram.org",
+ "Tracker": "https://github.com/PyrogramMod/PyrogramMod/issues",
+ "Community": "https://t.me/pyrogramodchat",
+ "Source": "https://github.com/PyrogramMod/PyrogramMod",
+ "Documentation": "https://pyrogrammod.readthedocs.io",
},
python_requires="~=3.8",
package_data={
From b6f49d0c43323cf7abf1deef7a02df19c5dd6df7 Mon Sep 17 00:00:00 2001
From: Nick <64551534+null-nick@users.noreply.github.com>
Date: Fri, 13 Sep 2024 11:33:20 +0200
Subject: [PATCH 02/78] updated `README`
---
README.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index fa55ffb3..331ff200 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
-
+
Telegram MTProto API Framework for Python (Fork of Pyrogram)
@@ -83,7 +83,7 @@ pip3 install https://github.com/PyrogramMod/PyrogramMod/archive/refs/heads/main.
- ๐ Docs: https://docs.pyrogram.org
------------------------------------------------------------
- ๐ Un-Official Repo: https://github.com/PyrogramMod/PyrogramMod/
-- ๐ News: https://t.me/PyroGramMod
+- ๐ News: https://t.me/PyroGramModNews
- ๐ญ Support Group: https://t.me/pyrogramodchat
- ๐ Docs: https://pyrogrammod.readthedocs.io/
------------------------------------------------------------
From a0bb0b58ca6b316f94d8ba21786b412a01eb7d46 Mon Sep 17 00:00:00 2001
From: nick <64551534+null-nick@users.noreply.github.com>
Date: Fri, 13 Sep 2024 11:57:24 +0200
Subject: [PATCH 03/78] fixes thanks to
https://github.com/KurimuzonAkuma/pyrogram/
---
pyrogram/client.py | 116 ++++++++++++++++++++++++++++++++++++-----
pyrogram/dispatcher.py | 81 +---------------------------
2 files changed, 103 insertions(+), 94 deletions(-)
diff --git a/pyrogram/client.py b/pyrogram/client.py
index 0ce34fe2..fce908c8 100644
--- a/pyrogram/client.py
+++ b/pyrogram/client.py
@@ -32,7 +32,7 @@
from io import StringIO, BytesIO
from mimetypes import MimeTypes
from pathlib import Path
-from typing import Union, List, Optional, Callable, AsyncGenerator, Type
+from typing import Union, List, Optional, Callable, AsyncGenerator, Type, Tuple
import pyrogram
from pyrogram import __version__, __license__
@@ -40,7 +40,8 @@
from pyrogram import raw
from pyrogram import utils
from pyrogram.crypto import aes
-from pyrogram.errors import CDNFileHashMismatch, AuthBytesInvalid
+from pyrogram.errors import CDNFileHashMismatch, AuthBytesInvalid, ChannelInvalid, PersistentTimestampInvalid, \
+ PersistentTimestampOutdated
from pyrogram.errors import (
SessionPasswordNeeded,
VolumeLocNotFound, ChannelPrivate,
@@ -186,7 +187,7 @@ class Client(Methods):
Defaults to False, because ``getpass`` (the library used) is known to be problematic in some
terminal environments.
- max_concurrent_transmissions (``bool``, *optional*):
+ max_concurrent_transmissions (``int``, *optional*):
Set the maximum amount of concurrent transmissions (uploads & downloads).
A value that is too high may result in network related issues.
Defaults to 1.
@@ -576,14 +577,14 @@ async def handle_updates(self, updates):
pts = getattr(update, "pts", None)
pts_count = getattr(update, "pts_count", None)
- if pts:
+ if pts and not self.skip_updates:
await self.storage.update_state(
(
- utils.get_channel_id(channel_id) if channel_id else self.me.id,
+ utils.get_channel_id(channel_id) if channel_id else 0,
pts,
None,
updates.date,
- None
+ updates.seq
)
)
@@ -617,15 +618,16 @@ async def handle_updates(self, updates):
self.dispatcher.updates_queue.put_nowait((update, users, chats))
elif isinstance(updates, (raw.types.UpdateShortMessage, raw.types.UpdateShortChatMessage)):
- await self.storage.update_state(
- (
- self.me.id,
- updates.pts,
- None,
- updates.date,
- None
+ if not self.skip_updates:
+ await self.storage.update_state(
+ (
+ 0,
+ updates.pts,
+ None,
+ updates.date,
+ None
+ )
)
- )
diff = await self.invoke(
raw.functions.updates.GetDifference(
@@ -653,6 +655,92 @@ async def handle_updates(self, updates):
elif isinstance(updates, raw.types.UpdatesTooLong):
log.info(updates)
+ async def recover_gaps(self) -> Tuple[int, int]:
+ states = await self.storage.update_state()
+
+ message_updates_counter = 0
+ other_updates_counter = 0
+
+ if not states:
+ log.info("No states found, skipping recovery.")
+ return message_updates_counter, other_updates_counter
+
+ for state in states:
+ id, local_pts, _, local_date, _ = state
+
+ prev_pts = 0
+
+ while True:
+ try:
+ diff = await self.invoke(
+ raw.functions.updates.GetChannelDifference(
+ channel=await self.resolve_peer(id),
+ filter=raw.types.ChannelMessagesFilterEmpty(),
+ pts=local_pts,
+ limit=10000,
+ force=False
+ ) if id < 0 else
+ raw.functions.updates.GetDifference(
+ pts=local_pts,
+ date=local_date,
+ qts=0
+ )
+ )
+ except (ChannelPrivate, ChannelInvalid, PersistentTimestampOutdated, PersistentTimestampInvalid):
+ break
+
+ if isinstance(diff, raw.types.updates.DifferenceEmpty):
+ break
+ elif isinstance(diff, raw.types.updates.DifferenceTooLong):
+ break
+ elif isinstance(diff, raw.types.updates.Difference):
+ local_pts = diff.state.pts
+ elif isinstance(diff, raw.types.updates.DifferenceSlice):
+ local_pts = diff.intermediate_state.pts
+ local_date = diff.intermediate_state.date
+
+ if prev_pts == local_pts:
+ break
+
+ prev_pts = local_pts
+ elif isinstance(diff, raw.types.updates.ChannelDifferenceEmpty):
+ break
+ elif isinstance(diff, raw.types.updates.ChannelDifferenceTooLong):
+ break
+ elif isinstance(diff, raw.types.updates.ChannelDifference):
+ local_pts = diff.pts
+
+ users = {i.id: i for i in diff.users}
+ chats = {i.id: i for i in diff.chats}
+
+ for message in diff.new_messages:
+ message_updates_counter += 1
+ self.dispatcher.updates_queue.put_nowait(
+ (
+ raw.types.UpdateNewMessage(
+ message=message,
+ pts=local_pts,
+ pts_count=-1
+ ),
+ users,
+ chats
+ )
+ )
+
+ for update in diff.other_updates:
+ other_updates_counter += 1
+ self.dispatcher.updates_queue.put_nowait(
+ (update, users, chats)
+ )
+
+ if isinstance(diff, (raw.types.updates.Difference, raw.types.updates.ChannelDifference)):
+ break
+
+ await self.storage.update_state(id)
+
+ log.info("Recovered %s messages and %s updates.", message_updates_counter, other_updates_counter)
+ return message_updates_counter, other_updates_counter
+
async def load_session(self):
await self.storage.open()
diff --git a/pyrogram/dispatcher.py b/pyrogram/dispatcher.py
index 804f5fbd..e9174b69 100644
--- a/pyrogram/dispatcher.py
+++ b/pyrogram/dispatcher.py
@@ -23,7 +23,6 @@
import pyrogram
from pyrogram import utils
-from pyrogram import raw
from pyrogram.handlers import (
CallbackQueryHandler, MessageHandler, EditedMessageHandler, DeletedMessagesHandler,
UserStatusHandler, RawUpdateHandler, InlineQueryHandler, PollHandler,
@@ -155,85 +154,7 @@ async def start(self):
log.info("Started %s HandlerTasks", self.client.workers)
if not self.client.skip_updates:
- states = await self.client.storage.update_state()
-
- if not states:
- log.info("No states found, skipping recovery.")
- return
-
- message_updates_counter = 0
- other_updates_counter = 0
-
- for state in states:
- id, local_pts, _, local_date, _ = state
-
- prev_pts = 0
-
- while True:
- diff = await self.client.invoke(
- raw.functions.updates.GetDifference(
- pts=local_pts,
- date=local_date,
- qts=0
- ) if id == self.client.me.id else
- raw.functions.updates.GetChannelDifference(
- channel=await self.client.resolve_peer(id),
- filter=raw.types.ChannelMessagesFilterEmpty(),
- pts=local_pts,
- limit=10000
- )
- )
-
- if isinstance(diff, (raw.types.updates.DifferenceEmpty, raw.types.updates.ChannelDifferenceEmpty)):
- break
- elif isinstance(diff, (raw.types.updates.DifferenceTooLong, raw.types.updates.ChannelDifferenceTooLong)):
- break
- elif isinstance(diff, raw.types.updates.ChannelDifference):
- local_pts = diff.pts
- elif isinstance(diff, raw.types.updates.Difference):
- local_pts = diff.state.pts
- elif isinstance(diff, raw.types.updates.DifferenceSlice):
- local_pts = diff.intermediate_state.pts
- local_date = diff.intermediate_state.date
-
- if prev_pts == local_pts:
- break
-
- prev_pts = local_pts
-
- users = {i.id: i for i in diff.users}
- chats = {i.id: i for i in diff.chats}
-
- for message in diff.new_messages:
- message_updates_counter += 1
- self.updates_queue.put_nowait(
- (
- raw.types.UpdateNewMessage(
- message=message,
- pts=local_pts,
- pts_count=-1
- ) if id == self.client.me.id else
- raw.types.UpdateNewChannelMessage(
- message=message,
- pts=local_pts,
- pts_count=-1
- ),
- users,
- chats
- )
- )
-
- for update in diff.other_updates:
- other_updates_counter += 1
- self.updates_queue.put_nowait(
- (update, users, chats)
- )
-
- if isinstance(diff, (raw.types.updates.Difference, raw.types.updates.ChannelDifference)):
- break
-
- await self.client.storage.update_state(None)
- log.info("Recovered %s messages and %s updates.", message_updates_counter, other_updates_counter)
+ await self.client.recover_gaps()
async def stop(self):
if not self.client.no_updates:
From 6c7e2d42120a7f3790ada7a470e0f1051c5864c1 Mon Sep 17 00:00:00 2001
From: nick <64551534+null-nick@users.noreply.github.com>
Date: Fri, 13 Sep 2024 12:27:02 +0200
Subject: [PATCH 04/78] Added support for `config.ini`
---
pyrogram/client.py | 40 +++++++++++++++++++++++++++++++-
pyrogram/methods/auth/connect.py | 1 +
requirements.txt | 1 +
3 files changed, 41 insertions(+), 1 deletion(-)
diff --git a/pyrogram/client.py b/pyrogram/client.py
index fce908c8..85bf21a1 100644
--- a/pyrogram/client.py
+++ b/pyrogram/client.py
@@ -26,6 +26,7 @@
import shutil
import sys
from concurrent.futures.thread import ThreadPoolExecutor
+from configparser import ConfigParser
from datetime import datetime, timedelta
from hashlib import sha256
from importlib import import_module
@@ -34,6 +35,8 @@
from pathlib import Path
from typing import Union, List, Optional, Callable, AsyncGenerator, Type, Tuple
+import aiofiles
+
import pyrogram
from pyrogram import __version__, __license__
from pyrogram import enums
@@ -152,6 +155,10 @@ class Client(Methods):
The working directory is the location in the filesystem where Pyrogram will store the session files.
Defaults to the parent directory of the main script.
+ config_file (``str``, *optional*):
+ Path of the configuration file.
+ Defaults to ./config.ini
+
plugins (``dict``, *optional*):
Smart Plugins settings as dict, e.g.: *dict(root="plugins")*.
@@ -193,7 +200,7 @@ class Client(Methods):
Defaults to 1.
"""
- APP_VERSION = f"Pyrogram {__version__}"
+ APP_VERSION = f"PyrogramMod {__version__}"
DEVICE_MODEL = f"{platform.python_implementation()} {platform.python_version()}"
SYSTEM_VERSION = f"{platform.system()} {platform.release()}"
@@ -205,6 +212,7 @@ class Client(Methods):
TME_PUBLIC_LINK_RE = re.compile(r"^(?:https?://)?(?:www|([\w-]+)\.)?(?:t(?:elegram)?\.(?:org|me|dog))/?([\w-]+)?$")
WORKERS = min(32, (os.cpu_count() or 0) + 4) # os.cpu_count() can be None
WORKDIR = PARENT_DIR
+ CONFIG_FILE = PARENT_DIR / "config.ini"
# Interval of seconds in which the updates watchdog will kick in
UPDATES_WATCHDOG_INTERVAL = 15 * 60
@@ -235,6 +243,7 @@ def __init__(
workers: int = WORKERS,
message_cache: int = 10000,
workdir: str = WORKDIR,
+ config_file: str = CONFIG_FILE,
plugins: dict = None,
parse_mode: "enums.ParseMode" = enums.ParseMode.DEFAULT,
no_updates: bool = None,
@@ -318,6 +327,7 @@ def __init__(
self.last_update_time = datetime.now()
self.loop = asyncio.get_event_loop()
+ self.config_file = config_file
def __enter__(self):
return self.start()
@@ -655,6 +665,34 @@ async def handle_updates(self, updates):
elif isinstance(updates, raw.types.UpdatesTooLong):
log.info(updates)
+ async def load_config(self):
+ async with aiofiles.open(self.config_file, mode='r') as file:
+ contents = await file.read()
+
+ parser = ConfigParser()
+ parser.read_string(contents)
+
+ if not self.bot_token:
+ self.bot_token = parser.get("pyrogram_mod", "bot_token", fallback=None)
+
+ if not (self.api_id and self.api_hash):
+ if parser.has_section("pyrogram_mod"):
+ self.api_id = parser.getint("pyrogram_mod", "api_id")
+ self.api_hash = parser.get("pyrogram_mod", "api_hash")
+ else:
+ raise AttributeError("No API Key found. More info: https://pyrogrammod.readthedocs.io/start/setup.html")
+
+ for option in ["app_version", "device_model", "system_version", "lang_code"]:
+ if not getattr(self, option):
+ if parser.has_section("pyrogram_mod"):
+ setattr(self, option, parser.get(
+ "pyrogram_mod",
+ option,
+ fallback=getattr(Client, option.upper())
+ ))
+ else:
+ setattr(self, option, getattr(Client, option.upper()))
+
async def recover_gaps(self) -> Tuple[int, int]:
states = await self.storage.update_state()
diff --git a/pyrogram/methods/auth/connect.py b/pyrogram/methods/auth/connect.py
index 612e064b..1a6b44aa 100644
--- a/pyrogram/methods/auth/connect.py
+++ b/pyrogram/methods/auth/connect.py
@@ -37,6 +37,7 @@ async def connect(
if self.is_connected:
raise ConnectionError("Client is already connected")
+ await self.load_config()
await self.load_session()
self.session = Session(
diff --git a/requirements.txt b/requirements.txt
index bf664153..b392534b 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,2 +1,3 @@
pyaes==1.6.1
pysocks==1.7.1
+aiofiles
\ No newline at end of file
From e99e99850cb43145b0a62fdd71c06ee718f6ae31 Mon Sep 17 00:00:00 2001
From: nick <64551534+null-nick@users.noreply.github.com>
Date: Fri, 13 Sep 2024 12:41:34 +0200
Subject: [PATCH 05/78] Add error handling for missing config file in
`load_config`
---
pyrogram/client.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/pyrogram/client.py b/pyrogram/client.py
index 85bf21a1..cd0eec53 100644
--- a/pyrogram/client.py
+++ b/pyrogram/client.py
@@ -666,6 +666,9 @@ async def handle_updates(self, updates):
log.info(updates)
async def load_config(self):
+ if not os.path.isfile(self.config_file):
+ raise FileNotFoundError(f"The configuration file at {self.config_file} does not exist.")
+
async with aiofiles.open(self.config_file, mode='r') as file:
contents = await file.read()
From 0f2e78afc2a3ecf0f8be0192574f524005e0d889 Mon Sep 17 00:00:00 2001
From: nick <64551534+null-nick@users.noreply.github.com>
Date: Fri, 13 Sep 2024 14:26:29 +0200
Subject: [PATCH 06/78] improve `config.ini` implementation
---
pyrogram/client.py | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/pyrogram/client.py b/pyrogram/client.py
index cd0eec53..52308109 100644
--- a/pyrogram/client.py
+++ b/pyrogram/client.py
@@ -157,7 +157,7 @@ class Client(Methods):
config_file (``str``, *optional*):
Path of the configuration file.
- Defaults to ./config.ini
+ If not provided, the default behavior is to not use any configuration file.
plugins (``dict``, *optional*):
Smart Plugins settings as dict, e.g.: *dict(root="plugins")*.
@@ -243,7 +243,7 @@ def __init__(
workers: int = WORKERS,
message_cache: int = 10000,
workdir: str = WORKDIR,
- config_file: str = CONFIG_FILE,
+ config_file: str = None,
plugins: dict = None,
parse_mode: "enums.ParseMode" = enums.ParseMode.DEFAULT,
no_updates: bool = None,
@@ -666,6 +666,9 @@ async def handle_updates(self, updates):
log.info(updates)
async def load_config(self):
+ if self.config_file is None:
+ return
+
if not os.path.isfile(self.config_file):
raise FileNotFoundError(f"The configuration file at {self.config_file} does not exist.")
From ab7f20c2759b6bf3d4d8e8315ebcf4b971c41771 Mon Sep 17 00:00:00 2001
From: nick <64551534+null-nick@users.noreply.github.com>
Date: Fri, 13 Sep 2024 21:50:24 +0200
Subject: [PATCH 07/78] fixed pypi publish
---
.github/workflows/publish.yaml | 2 +-
setup.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml
index cf0d03a9..fa44420e 100644
--- a/.github/workflows/publish.yaml
+++ b/.github/workflows/publish.yaml
@@ -40,7 +40,7 @@ jobs:
- uses: actions/upload-artifact@v4
with:
name: program-mod-wheel
- path: ./wheels/Pyrogram_Mod*.whl
+ path: ./wheels/pyrogrammod*.whl
if-no-files-found: error
- name: Publish a Python distribution to PyPI
diff --git a/setup.py b/setup.py
index b9f6bd7a..b35a64da 100644
--- a/setup.py
+++ b/setup.py
@@ -38,7 +38,7 @@
errors_compiler.start()
setup(
- name="Pyrogram-Mod",
+ name="pyrogrammod",
version=version,
description="Modified version of the Pyrogram Telegram MTProto API framework in Python for users and bots.",
long_description=readme,
From a0d6b65084eeca2d546b335bd4d8654849161848 Mon Sep 17 00:00:00 2001
From: nick <64551534+null-nick@users.noreply.github.com>
Date: Fri, 13 Sep 2024 21:53:28 +0200
Subject: [PATCH 08/78] Version Bump
---
pyrogram/__init__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyrogram/__init__.py b/pyrogram/__init__.py
index 7ab55c33..174d3cf7 100644
--- a/pyrogram/__init__.py
+++ b/pyrogram/__init__.py
@@ -16,7 +16,7 @@
# You should have received a copy of the GNU Lesser General Public License
# along with Pyrogram. If not, see .
-__version__ = "2.1.1"
+__version__ = "2.1.2"
__license__ = "GNU Lesser General Public License v3.0 (LGPL-3.0)"
__copyright__ = "Copyright (C) 2017-present Dan "
From 96c8c11af4918fb64a4d87238a3b47931eb1df2f Mon Sep 17 00:00:00 2001
From: nick <64551534+null-nick@users.noreply.github.com>
Date: Sun, 15 Sep 2024 23:03:14 +0200
Subject: [PATCH 09/78] fixed `reaction count None` (#25)
---
pyrogram/types/messages_and_media/reaction.py | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/pyrogram/types/messages_and_media/reaction.py b/pyrogram/types/messages_and_media/reaction.py
index 17e08ff5..2e4046a6 100644
--- a/pyrogram/types/messages_and_media/reaction.py
+++ b/pyrogram/types/messages_and_media/reaction.py
@@ -61,7 +61,7 @@ def __init__(
def _parse(
client: "pyrogram.Client",
reaction: "raw.base.Reaction"
- ) -> "Reaction":
+ ) -> Optional["Reaction"]:
if isinstance(reaction, raw.types.ReactionEmoji):
return Reaction(
client=client,
@@ -74,13 +74,19 @@ def _parse(
custom_emoji_id=reaction.document_id
)
+ return None
+
@staticmethod
def _parse_count(
client: "pyrogram.Client",
- reaction_count: "raw.base.ReactionCount"
- ) -> "Reaction":
+ reaction_count: Optional["raw.base.ReactionCount"]
+ ) -> Optional["Reaction"]:
+ if not reaction_count:
+ return None
+
reaction = Reaction._parse(client, reaction_count.reaction)
- reaction.count = reaction_count.count
- reaction.chosen_order = reaction_count.chosen_order
+ if reaction:
+ reaction.count = reaction_count.count
+ reaction.chosen_order = reaction_count.chosen_order
return reaction
From ce77f8a53f5a14bb2da1749733d0e4c6f4584c59 Mon Sep 17 00:00:00 2001
From: Nick <64551534+null-nick@users.noreply.github.com>
Date: Sun, 15 Sep 2024 23:10:28 +0200
Subject: [PATCH 10/78] updated `readme.md`
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 331ff200..3b6e0168 100644
--- a/README.md
+++ b/README.md
@@ -18,7 +18,7 @@
-## Pyrogram
+# PyrogramMod
[](https://pypi.org/project/pyrogrammod/) [](https://pepy.tech/project/pyrogrammod)
> Elegant, modern and asynchronous Telegram MTProto API framework in Python for users and bots
From a222890badbd63cd6f9bc56082ec9b91aa65800e Mon Sep 17 00:00:00 2001
From: nick <64551534+null-nick@users.noreply.github.com>
Date: Sun, 15 Sep 2024 23:14:24 +0200
Subject: [PATCH 11/78] fix: private filter support in CallbackQuery (thanks
to:
https://github.com/TelegramPlayGround/pyrogram/commit/a8f470315e2010b5bd4554bbb6b080b3e8030e54)
pyrogram/pyrogram#1391
---
pyrogram/filters.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/pyrogram/filters.py b/pyrogram/filters.py
index 25032c71..6504d78d 100644
--- a/pyrogram/filters.py
+++ b/pyrogram/filters.py
@@ -458,8 +458,12 @@ async def media_spoiler_filter(_, __, m: Message):
# endregion
# region private_filter
-async def private_filter(_, __, m: Message):
- m = m.message if isinstance(m, CallbackQuery) else m
+async def private_filter(_, __, m: Union[Message, CallbackQuery]) -> bool:
+ m = getattr(m, "message", None) if isinstance(m, CallbackQuery) else m
+ if not m:
+ raise ValueError(
+ "filters.private is not supported here "
+ )
return bool(m.chat and m.chat.type in {enums.ChatType.PRIVATE, enums.ChatType.BOT})
From e11b78bf5b559ec75eca6337721a09ce769f5cfb Mon Sep 17 00:00:00 2001
From: KurimuzonAkuma
Date: Wed, 28 Aug 2024 21:09:38 +0300
Subject: [PATCH 12/78] Ignore PersistentTimestamp errors
---
pyrogram/client.py | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/pyrogram/client.py b/pyrogram/client.py
index 52308109..062d86fa 100644
--- a/pyrogram/client.py
+++ b/pyrogram/client.py
@@ -48,9 +48,13 @@
from pyrogram.errors import (
SessionPasswordNeeded,
VolumeLocNotFound, ChannelPrivate,
- BadRequest,
- FloodWait,
- FloodPremiumWait
+ BadRequest,
+ AuthBytesInvalid,
+ FloodWait,
+ FloodPremiumWait,
+ ChannelInvalid,
+ PersistentTimestampInvalid,
+ PersistentTimestampOutdated
)
from pyrogram.handlers.handler import Handler
from pyrogram.methods import Methods
@@ -619,7 +623,7 @@ async def handle_updates(self, updates):
limit=pts
)
)
- except ChannelPrivate:
+ except (ChannelPrivate, PersistentTimestampOutdated, PersistentTimestampInvalid):
pass
else:
if not isinstance(diff, raw.types.updates.ChannelDifferenceEmpty):
From 7a4e2cf2f6617c276f55dc36d535f0306c332d51 Mon Sep 17 00:00:00 2001
From: KurimuzonAkuma
Date: Wed, 28 Aug 2024 21:07:22 +0300
Subject: [PATCH 13/78] Extract recovering gaps into a separate method
---
pyrogram/client.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/pyrogram/client.py b/pyrogram/client.py
index 062d86fa..52f099f4 100644
--- a/pyrogram/client.py
+++ b/pyrogram/client.py
@@ -620,7 +620,8 @@ async def handle_updates(self, updates):
)]
),
pts=pts - pts_count,
- limit=pts
+ limit=pts,
+ force=False
)
)
except (ChannelPrivate, PersistentTimestampOutdated, PersistentTimestampInvalid):
From dc71b22c94caae9256f0d1513933cd5fc63d47d3 Mon Sep 17 00:00:00 2001
From: KurimuzonAkuma
Date: Tue, 27 Aug 2024 11:37:13 +0300
Subject: [PATCH 14/78] Fix save_file in case client.me is None
---
pyrogram/methods/advanced/save_file.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/pyrogram/methods/advanced/save_file.py b/pyrogram/methods/advanced/save_file.py
index 453a62af..205c30f9 100644
--- a/pyrogram/methods/advanced/save_file.py
+++ b/pyrogram/methods/advanced/save_file.py
@@ -128,7 +128,10 @@ async def worker(session):
if file_size == 0:
raise ValueError("File size equals to 0 B")
- file_size_limit_mib = 4000 if self.me.is_premium else 2000
+ # TODO
+ file_size_limit_mib = 2000
+ if self.me and self.me.is_premium:
+ file_size_limit_mib = 4000
if file_size > file_size_limit_mib * 1024 * 1024:
raise ValueError(f"Can't upload files bigger than {file_size_limit_mib} MiB")
From 82d9fd0388b789718adb30d9b1ae00b4ea88c609 Mon Sep 17 00:00:00 2001
From: shriMADhav U k
Date: Fri, 16 Aug 2024 08:45:25 +0200
Subject: [PATCH 15/78] Fix (iabw) parsing reactions
---
pyrogram/types/messages_and_media/reaction.py | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/pyrogram/types/messages_and_media/reaction.py b/pyrogram/types/messages_and_media/reaction.py
index 2e4046a6..9aa9d680 100644
--- a/pyrogram/types/messages_and_media/reaction.py
+++ b/pyrogram/types/messages_and_media/reaction.py
@@ -39,6 +39,10 @@ class Reaction(Object):
chosen_order (``int``, *optional*):
Chosen reaction order.
Available for chosen reactions.
+
+ is_paid (``bool``, *optional*):
+ True, if this is a paid reaction.
+
"""
def __init__(
@@ -48,7 +52,8 @@ def __init__(
emoji: Optional[str] = None,
custom_emoji_id: Optional[int] = None,
count: Optional[int] = None,
- chosen_order: Optional[int] = None
+ chosen_order: Optional[int] = None,
+ is_paid: Optional[bool] = None
):
super().__init__(client)
@@ -56,6 +61,7 @@ def __init__(
self.custom_emoji_id = custom_emoji_id
self.count = count
self.chosen_order = chosen_order
+ self.is_paid = is_paid
@staticmethod
def _parse(
@@ -74,6 +80,12 @@ def _parse(
custom_emoji_id=reaction.document_id
)
+ if isinstance(reaction, raw.types.ReactionPaid):
+ return Reaction(
+ client=client,
+ is_paid=True
+ )
+
return None
@staticmethod
@@ -86,7 +98,7 @@ def _parse_count(
reaction = Reaction._parse(client, reaction_count.reaction)
if reaction:
- reaction.count = reaction_count.count
+ reaction.count = reaction_count.count if reaction_count else 0
reaction.chosen_order = reaction_count.chosen_order
return reaction
From 90020062e0904d3d283afdb4a138c9ecda99d0a3 Mon Sep 17 00:00:00 2001
From: nick <64551534+null-nick@users.noreply.github.com>
Date: Sun, 15 Sep 2024 23:22:14 +0200
Subject: [PATCH 16/78] Version Bump
---
pyrogram/__init__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyrogram/__init__.py b/pyrogram/__init__.py
index 174d3cf7..8a7977ec 100644
--- a/pyrogram/__init__.py
+++ b/pyrogram/__init__.py
@@ -16,7 +16,7 @@
# You should have received a copy of the GNU Lesser General Public License
# along with Pyrogram. If not, see .
-__version__ = "2.1.2"
+__version__ = "2.1.3"
__license__ = "GNU Lesser General Public License v3.0 (LGPL-3.0)"
__copyright__ = "Copyright (C) 2017-present Dan "
From 583ce6d7ce2c79b73d98da8a09882e2b4d20db84 Mon Sep 17 00:00:00 2001
From: nick <64551534+null-nick@users.noreply.github.com>
Date: Sun, 15 Sep 2024 23:34:09 +0200
Subject: [PATCH 17/78] save_files fixes
---
pyrogram/methods/advanced/save_file.py | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/pyrogram/methods/advanced/save_file.py b/pyrogram/methods/advanced/save_file.py
index 205c30f9..ebb01998 100644
--- a/pyrogram/methods/advanced/save_file.py
+++ b/pyrogram/methods/advanced/save_file.py
@@ -128,10 +128,7 @@ async def worker(session):
if file_size == 0:
raise ValueError("File size equals to 0 B")
- # TODO
- file_size_limit_mib = 2000
- if self.me and self.me.is_premium:
- file_size_limit_mib = 4000
+ file_size_limit_mib = 4000 if self.me and self.me.is_premium else 2000
if file_size > file_size_limit_mib * 1024 * 1024:
raise ValueError(f"Can't upload files bigger than {file_size_limit_mib} MiB")
From d642f3e32ef818bd5696ff807365ae3aabfeef78 Mon Sep 17 00:00:00 2001
From: nick <64551534+null-nick@users.noreply.github.com>
Date: Sun, 15 Sep 2024 23:37:01 +0200
Subject: [PATCH 18/78] Version Bump
---
pyrogram/__init__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyrogram/__init__.py b/pyrogram/__init__.py
index 8a7977ec..5401a918 100644
--- a/pyrogram/__init__.py
+++ b/pyrogram/__init__.py
@@ -16,7 +16,7 @@
# You should have received a copy of the GNU Lesser General Public License
# along with Pyrogram. If not, see .
-__version__ = "2.1.3"
+__version__ = "2.1.4"
__license__ = "GNU Lesser General Public License v3.0 (LGPL-3.0)"
__copyright__ = "Copyright (C) 2017-present Dan "
From 8ed28483d0e0e0990fc5943cd03815de134307c3 Mon Sep 17 00:00:00 2001
From: nick <64551534+null-nick@users.noreply.github.com>
Date: Mon, 16 Sep 2024 11:22:52 +0200
Subject: [PATCH 19/78] attempt to fix: `OSError: unable to perform operation
on ; the handler is closed`
---
pyrogram/client.py | 71 ++++++++++++++++++++++++-------------
pyrogram/session/session.py | 37 +++++++++++++------
2 files changed, 72 insertions(+), 36 deletions(-)
diff --git a/pyrogram/client.py b/pyrogram/client.py
index 52f099f4..51e7b445 100644
--- a/pyrogram/client.py
+++ b/pyrogram/client.py
@@ -609,23 +609,33 @@ async def handle_updates(self, updates):
message = update.message
if not isinstance(message, raw.types.MessageEmpty):
- try:
- diff = await self.invoke(
- raw.functions.updates.GetChannelDifference(
- channel=await self.resolve_peer(utils.get_channel_id(channel_id)),
- filter=raw.types.ChannelMessagesFilter(
- ranges=[raw.types.MessageRange(
- min_id=update.message.id,
- max_id=update.message.id
- )]
- ),
- pts=pts - pts_count,
- limit=pts,
- force=False
+ retries = 5
+ while retries > 0:
+ try:
+ diff = await self.invoke(
+ raw.functions.updates.GetChannelDifference(
+ channel=await self.resolve_peer(utils.get_channel_id(channel_id)),
+ filter=raw.types.ChannelMessagesFilter(
+ ranges=[raw.types.MessageRange(
+ min_id=update.message.id,
+ max_id=update.message.id
+ )]
+ ),
+ pts=pts - pts_count,
+ limit=pts,
+ force=False
+ )
)
- )
- except (ChannelPrivate, PersistentTimestampOutdated, PersistentTimestampInvalid):
- pass
+ break
+ except (ChannelPrivate, PersistentTimestampOutdated, PersistentTimestampInvalid):
+ pass
+ except OSError as e:
+ log.error(f"Connection error while fetching ChannelDifference: {e}. Retrying...")
+ retries -= 1
+ if retries == 0:
+ log.error(f"Max retries reached for ChannelDifference: {e}")
+ raise
+ await asyncio.sleep(5)
else:
if not isinstance(diff, raw.types.updates.ChannelDifferenceEmpty):
users.update({u.id: u for u in diff.users})
@@ -644,13 +654,24 @@ async def handle_updates(self, updates):
)
)
- diff = await self.invoke(
- raw.functions.updates.GetDifference(
- pts=updates.pts - updates.pts_count,
- date=updates.date,
- qts=-1
- )
- )
+ retries = 5
+ while retries > 0:
+ try:
+ diff = await self.invoke(
+ raw.functions.updates.GetDifference(
+ pts=updates.pts - updates.pts_count,
+ date=updates.date,
+ qts=-1
+ )
+ )
+ break
+ except OSError as e:
+ log.error(f"Connection error during GetDifference: {e}. Retrying...")
+ retries -= 1
+ if retries == 0:
+ log.error(f"Max retries reached for GetDifference: {e}")
+ raise
+ await asyncio.sleep(5)
if diff.new_messages:
self.dispatcher.updates_queue.put_nowait((
@@ -712,7 +733,7 @@ async def recover_gaps(self) -> Tuple[int, int]:
if not states:
log.info("No states found, skipping recovery.")
- return message_updates_counter, other_updates_counter
+ return (message_updates_counter, other_updates_counter)
for state in states:
id, local_pts, _, local_date, _ = state
@@ -788,7 +809,7 @@ async def recover_gaps(self) -> Tuple[int, int]:
await self.storage.update_state(id)
log.info("Recovered %s messages and %s updates.", message_updates_counter, other_updates_counter)
- return message_updates_counter, other_updates_counter
+ return (message_updates_counter, other_updates_counter)
async def load_session(self):
await self.storage.open()
diff --git a/pyrogram/session/session.py b/pyrogram/session/session.py
index 91168599..9c4acd40 100644
--- a/pyrogram/session/session.py
+++ b/pyrogram/session/session.py
@@ -29,8 +29,9 @@
from pyrogram.connection import Connection
from pyrogram.crypto import mtproto
from pyrogram.errors import (
- RPCError, InternalServerError, AuthKeyDuplicated, FloodWait, FloodPremiumWait, ServiceUnavailable, BadMsgNotification,
- SecurityCheckMismatch
+ RPCError, InternalServerError, AuthKeyDuplicated, FloodWait, FloodPremiumWait, ServiceUnavailable,
+ BadMsgNotification,
+ SecurityCheckMismatch, Unauthorized
)
from pyrogram.raw.all import layer
from pyrogram.raw.core import TLObject, MsgContainer, Int, FutureSalts
@@ -186,14 +187,19 @@ async def restart(self):
await self.start()
async def handle_packet(self, packet):
- data = await self.loop.run_in_executor(
- pyrogram.crypto_executor,
- mtproto.unpack,
- BytesIO(packet),
- self.session_id,
- self.auth_key,
- self.auth_key_id
- )
+ try:
+ data = await self.loop.run_in_executor(
+ pyrogram.crypto_executor,
+ mtproto.unpack,
+ BytesIO(packet),
+ self.session_id,
+ self.auth_key,
+ self.auth_key_id
+ )
+ except ValueError as e:
+ log.debug(e)
+ self.loop.create_task(self.restart())
+ return
messages = (
data.body.messages
@@ -287,7 +293,10 @@ async def ping_worker(self):
ping_id=0, disconnect_delay=self.WAIT_TIMEOUT + 10
), False
)
- except (OSError, RPCError):
+ except OSError:
+ self.loop.create_task(self.restart())
+ break
+ except RPCError:
pass
log.info("PingTask stopped")
@@ -302,6 +311,12 @@ async def recv_worker(self):
if packet:
error_code = -Int.read(BytesIO(packet))
+ if error_code == 404:
+ raise Unauthorized(
+ "Auth key not found in the system. You must delete your session file "
+ "and log in again with your phone number or bot token."
+ )
+
log.warning(
"Server sent transport error: %s (%s)",
error_code, Session.TRANSPORT_ERRORS.get(error_code, "unknown error")
From 0340cc7eb35a9ed3b5385eee1229ec2d6c9b128b Mon Sep 17 00:00:00 2001
From: nick <64551534+null-nick@users.noreply.github.com>
Date: Thu, 19 Sep 2024 12:04:56 +0200
Subject: [PATCH 20/78] Update API scheme to layer 188.
---
compiler/api/source/main_api.tl | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/compiler/api/source/main_api.tl b/compiler/api/source/main_api.tl
index d096b0e1..d10824f7 100644
--- a/compiler/api/source/main_api.tl
+++ b/compiler/api/source/main_api.tl
@@ -138,7 +138,7 @@ messageMediaPhoto#695150d7 flags:# spoiler:flags.3?true photo:flags.0?Photo ttl_
messageMediaGeo#56e0d474 geo:GeoPoint = MessageMedia;
messageMediaContact#70322949 phone_number:string first_name:string last_name:string vcard:string user_id:long = MessageMedia;
messageMediaUnsupported#9f84f49e = MessageMedia;
-messageMediaDocument#4cf4d72d flags:# nopremium:flags.3?true spoiler:flags.4?true video:flags.6?true round:flags.7?true voice:flags.8?true document:flags.0?Document alt_document:flags.5?Document ttl_seconds:flags.2?int = MessageMedia;
+messageMediaDocument#dd570bd5 flags:# nopremium:flags.3?true spoiler:flags.4?true video:flags.6?true round:flags.7?true voice:flags.8?true document:flags.0?Document alt_documents:flags.5?Vector ttl_seconds:flags.2?int = MessageMedia;
messageMediaWebPage#ddf10c3b flags:# force_large_media:flags.0?true force_small_media:flags.1?true manual:flags.3?true safe:flags.4?true webpage:WebPage = MessageMedia;
messageMediaVenue#2ec0533f geo:GeoPoint title:string address:string provider:string venue_id:string venue_type:string = MessageMedia;
messageMediaGame#fdb19008 game:Game = MessageMedia;
@@ -587,7 +587,7 @@ accountDaysTTL#b8d0afdf days:int = AccountDaysTTL;
documentAttributeImageSize#6c37c15c w:int h:int = DocumentAttribute;
documentAttributeAnimated#11b58939 = DocumentAttribute;
documentAttributeSticker#6319d612 flags:# mask:flags.1?true alt:string stickerset:InputStickerSet mask_coords:flags.0?MaskCoords = DocumentAttribute;
-documentAttributeVideo#17399fad flags:# round_message:flags.0?true supports_streaming:flags.1?true nosound:flags.3?true duration:double w:int h:int preload_prefix_size:flags.2?int video_start_ts:flags.4?double = DocumentAttribute;
+documentAttributeVideo#43c57c48 flags:# round_message:flags.0?true supports_streaming:flags.1?true nosound:flags.3?true duration:double w:int h:int preload_prefix_size:flags.2?int video_start_ts:flags.4?double video_codec:flags.5?string = DocumentAttribute;
documentAttributeAudio#9852f9c6 flags:# voice:flags.10?true duration:int title:flags.0?string performer:flags.1?string waveform:flags.2?bytes = DocumentAttribute;
documentAttributeFilename#15590068 file_name:string = DocumentAttribute;
documentAttributeHasStickers#9801d2f7 = DocumentAttribute;
@@ -667,6 +667,7 @@ keyboardButtonWebView#13767230 text:string url:string = KeyboardButton;
keyboardButtonSimpleWebView#a0c0505c text:string url:string = KeyboardButton;
keyboardButtonRequestPeer#53d7bfd8 text:string button_id:int peer_type:RequestPeerType max_quantity:int = KeyboardButton;
inputKeyboardButtonRequestPeer#c9662d05 flags:# name_requested:flags.0?true username_requested:flags.1?true photo_requested:flags.2?true text:string button_id:int peer_type:RequestPeerType max_quantity:int = KeyboardButton;
+keyboardButtonCopy#75d2698e text:string copy_text:string = KeyboardButton;
keyboardButtonRow#77608b83 buttons:Vector = KeyboardButtonRow;
@@ -2372,7 +2373,7 @@ channels.reorderPinnedForumTopics#2950a18f flags:# force:flags.0?true channel:In
channels.toggleAntiSpam#68f3e4eb channel:InputChannel enabled:Bool = Updates;
channels.reportAntiSpamFalsePositive#a850a693 channel:InputChannel msg_id:int = Bool;
channels.toggleParticipantsHidden#6a6e7854 channel:InputChannel enabled:Bool = Updates;
-channels.clickSponsoredMessage#18afbc93 channel:InputChannel random_id:bytes = Bool;
+channels.clickSponsoredMessage#1445d75 flags:# media:flags.0?true fullscreen:flags.1?true channel:InputChannel random_id:bytes = Bool;
channels.updateColor#d8aa3671 flags:# for_profile:flags.1?true channel:InputChannel color:flags.2?int background_emoji_id:flags.0?long = Updates;
channels.toggleViewForumAsMessages#9738bb15 channel:InputChannel enabled:Bool = Updates;
channels.getChannelRecommendations#25a71742 flags:# channel:flags.0?InputChannel = messages.Chats;
@@ -2556,4 +2557,4 @@ smsjobs.finishJob#4f1ebf24 flags:# job_id:string error:flags.0?string = Bool;
fragment.getCollectibleInfo#be1e85ba collectible:InputCollectible = fragment.CollectibleInfo;
-// LAYER 187
+// LAYER 188
From 8d3190f48e8071630de8b052e177f4742f7a7a72 Mon Sep 17 00:00:00 2001
From: shriMADhav U k
Date: Tue, 2 Apr 2024 19:41:28 +0200
Subject: [PATCH 21/78] Automate error scrapping
Credits: https://t.me/c/1999755950/19474
thanks to https://github.com/TelegramPlayGround/pyrogram/commit/c67504c7c930ed882988715a2c2fa60a25c8d081
---
.github/workflows/scrape-errors.yml | 38 +
compiler/errors/sort.py | 73 +-
compiler/errors/source/400_BAD_REQUEST.tsv | 900 ++++++++++--------
compiler/errors/source/403_FORBIDDEN.tsv | 546 ++++++++++-
compiler/errors/source/406_NOT_ACCEPTABLE.tsv | 543 ++++++++++-
.../source/500_INTERNAL_SERVER_ERROR.tsv | 521 +++++++++-
6 files changed, 2122 insertions(+), 499 deletions(-)
create mode 100644 .github/workflows/scrape-errors.yml
diff --git a/.github/workflows/scrape-errors.yml b/.github/workflows/scrape-errors.yml
new file mode 100644
index 00000000..e5dcf28c
--- /dev/null
+++ b/.github/workflows/scrape-errors.yml
@@ -0,0 +1,38 @@
+name: Scrape Errors
+on:
+ workflow_dispatch: {} # Allow manually kicking off builds
+ schedule:
+ - cron: '0 12 * * *' # Every day at 12:00 (noon). Ref https://crontab.guru/examples.html
+jobs:
+ build:
+ name: scrape-errors
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ fetch-depth: 1
+ - name: Set up Python
+ uses: actions/setup-python@v3
+ with:
+ python-version: '3.9'
+
+ - name: scrape
+ run: |
+ cd compiler/errors/
+ pip install --upgrade pip setuptools wheel
+ pip install requests==2.28.1
+ python sort.py scrape
+ python sort.py sort
+
+ - name: Open Pull Request
+ uses: peter-evans/create-pull-request@v4
+ with:
+ commit-message: >
+ Update unknown_errors
+ title: >
+ Update Telegram API errors
+ body: >
+ This is an automated PR. Please check the diff, and the action logs, to check for any funky behaviour.
+ branch: automated/api-error-scrape
+ labels: automated
+ delete-branch: true
diff --git a/compiler/errors/sort.py b/compiler/errors/sort.py
index db94e351..5baefc5e 100644
--- a/compiler/errors/sort.py
+++ b/compiler/errors/sort.py
@@ -18,18 +18,69 @@
import csv
from pathlib import Path
+import re
+import requests # requests==2.28.1
+import sys
-for p in Path("source").glob("*.tsv"):
- with open(p) as f:
- reader = csv.reader(f, delimiter="\t")
- dct = {k: v for k, v in reader if k != "id"}
- keys = sorted(dct)
+if len(sys.argv) != 2:
+ sys.exit(1)
- with open(p, "w") as f:
- f.write("id\tmessage\n")
+if sys.argv[1] == "sort":
+ for p in Path("source").glob("*.tsv"):
+ with open(p) as f:
+ reader = csv.reader(f, delimiter="\t")
+ dct = {k: v for k, v in reader if k != "id"}
+ keys = sorted(dct)
- for i, item in enumerate(keys, start=1):
- f.write(f"{item}\t{dct[item]}")
+ with open(p, "w") as f:
+ f.write("id\tmessage\n")
- if i != len(keys):
- f.write("\n")
+ for i, item in enumerate(keys, start=1):
+ f.write(f"{item}\t{dct[item]}")
+
+ if i != len(keys):
+ f.write("\n")
+
+elif sys.argv[1] == "scrape":
+ b = "https://core.telegram.org"
+ c = "/api/errors"
+ a = requests.get(b + c)
+ d = a.text
+ e = r"\here.*\<\/a\>"
+ f = re.search(e, d)
+ if f:
+ a = requests.get(
+ b + f.group(1)
+ )
+ d = a.json()
+ e = d.get("errors", [])
+ for h in e:
+ dct = {}
+
+ j = d.get("errors").get(h)
+ for k in j:
+ if k.endswith("_*"):
+ continue
+ g = d.get("descriptions")
+ l = g.get(k)
+ m = k.replace("_%d", "_X")
+ l = l.replace("%d", "{value}")
+ l = l.replace("»", "ยป")
+ l = l.replace("«", "ยซ")
+ l = l.replace("](/api/", f"]({b}/api/")
+ dct[m] = l
+
+ for p in Path("source/").glob(f"{h}*.tsv"):
+ with open(p) as f:
+ reader = csv.reader(f, delimiter="\t")
+ for k, v in reader:
+ if k != "id":
+ dct[k] = v
+
+ keys = sorted(dct)
+
+ for p in Path("source/").glob(f"{h}*.tsv"):
+ with open(p, "w") as f:
+ f.write("id\tmessage\n")
+ for i, item in enumerate(keys, start=1):
+ f.write(f"{item}\t{dct[item]}\n")
\ No newline at end of file
diff --git a/compiler/errors/source/400_BAD_REQUEST.tsv b/compiler/errors/source/400_BAD_REQUEST.tsv
index e57b1e8f..9284cd60 100644
--- a/compiler/errors/source/400_BAD_REQUEST.tsv
+++ b/compiler/errors/source/400_BAD_REQUEST.tsv
@@ -1,456 +1,518 @@
id message
-ABOUT_TOO_LONG The provided about/bio text is too long
-ACCESS_TOKEN_EXPIRED The bot token has expired
-ACCESS_TOKEN_INVALID The bot access token is invalid
-ADMINS_TOO_MUCH The chat has too many administrators
-ADMIN_ID_INVALID The specified admin ID is invalid
-ADMIN_RANK_EMOJI_NOT_ALLOWED Emoji are not allowed in custom administrator titles
-ADMIN_RANK_INVALID The custom administrator title is invalid or too long
-ALBUM_PHOTOS_TOO_MANY Too many photos were included in the album
-API_ID_INVALID The api_id/api_hash combination is invalid
-API_ID_PUBLISHED_FLOOD You are using an API key that is limited on the server side because it was published somewhere
-ARTICLE_TITLE_EMPTY The article title is empty
-AUDIO_CONTENT_URL_EMPTY The remote URL specified in the content field is empty
-AUDIO_TITLE_EMPTY The title attribute of the audio is empty
-AUTH_BYTES_INVALID The authorization bytes are invalid
-AUTH_TOKEN_ALREADY_ACCEPTED The authorization token was already used
-AUTH_TOKEN_EXCEPTION An error occurred while importing the auth token
-AUTH_TOKEN_EXPIRED The provided authorization token has expired and the updated QR-code must be re-scanned
-AUTH_TOKEN_INVALID An invalid authorization token was provided
-AUTH_TOKEN_INVALID2 An invalid authorization token was provided
-AUTH_TOKEN_INVALIDX The specified auth token is invalid
-AUTOARCHIVE_NOT_AVAILABLE This feature is not yet enabled for your account due to it not receiving too many private messages from strangers
-BANK_CARD_NUMBER_INVALID The credit card number is invalid
-BANNED_RIGHTS_INVALID You provided a set of restrictions that is invalid
+2FA_CONFIRM_WAIT_X Since this account is active and protected by a 2FA password, we will delete it in 1 week for security purposes. You can cancel this process at any time, you'll be able to reset your account in {value} seconds.
+ABOUT_TOO_LONG About string too long.
+ACCESS_TOKEN_EXPIRED Access token expired.
+ACCESS_TOKEN_INVALID Access token invalid.
+ADDRESS_INVALID The specified geopoint address is invalid.
+ADMINS_TOO_MUCH There are too many admins.
+ADMIN_ID_INVALID The specified admin ID is invalid.
+ADMIN_RANK_EMOJI_NOT_ALLOWED An admin rank cannot contain emojis.
+ADMIN_RANK_INVALID The specified admin rank is invalid.
+ADMIN_RIGHTS_EMPTY The chatAdminRights constructor passed in keyboardButtonRequestPeer.peer_type.user_admin_rights has no rights set (i.e. flags is 0).
+ALBUM_PHOTOS_TOO_MANY You have uploaded too many profile photos, delete some before retrying.
+API_ID_INVALID API ID invalid.
+API_ID_PUBLISHED_FLOOD This API id was published somewhere, you can't use it now.
+ARTICLE_TITLE_EMPTY The title of the article is empty.
+AUDIO_CONTENT_URL_EMPTY The remote URL specified in the content field is empty.
+AUDIO_TITLE_EMPTY An empty audio title was provided.
+AUTH_BYTES_INVALID The provided authorization is invalid.
+AUTH_TOKEN_ALREADY_ACCEPTED The specified auth token was already accepted.
+AUTH_TOKEN_EXCEPTION An error occurred while importing the auth token.
+AUTH_TOKEN_EXPIRED The authorization token has expired.
+AUTH_TOKEN_INVALID The specified auth token is invalid.
+AUTH_TOKEN_INVALIDX The specified auth token is invalid.
+AUTOARCHIVE_NOT_AVAILABLE The autoarchive setting is not available at this time: please check the value of the [autoarchive_setting_available field in client config »](https://core.telegram.org/api/config#client-configuration) before calling this method.
+BANK_CARD_NUMBER_INVALID The specified card number is invalid.
+BANNED_RIGHTS_INVALID You provided some invalid flags in the banned rights.
BASE_PORT_LOC_INVALID The base port location is invalid
-BOTS_TOO_MUCH The chat has too many bots
-BOT_CHANNELS_NA Bots can't edit admin privileges
-BOT_COMMAND_DESCRIPTION_INVALID The command description was empty, too long or had invalid characters
-BOT_COMMAND_INVALID The specified command is invalid
-BOT_DOMAIN_INVALID The domain used for the auth button does not match the one configured in @BotFather
+BIRTHDAY_INVALID The age should be less than 150 year old in Telegram
+BOOSTS_EMPTY No boost slots were specified.
+BOOSTS_REQUIRED The specified channel must first be [boosted by its users](https://core.telegram.org/api/boost) in order to perform this action.
+BOOST_NOT_MODIFIED You're already [boosting](https://core.telegram.org/api/boost) the specified channel.
+BOOST_PEER_INVALID The specified `boost_peer` is invalid.
+BOTS_TOO_MUCH There are too many bots in this chat/channel.
+BOT_APP_INVALID The specified bot app is invalid.
+BOT_APP_SHORTNAME_INVALID The specified bot app short name is invalid.
+BOT_CHANNELS_NA Bots can't edit admin privileges.
+BOT_COMMAND_DESCRIPTION_INVALID The specified command description is invalid.
+BOT_COMMAND_INVALID The specified command is invalid.
+BOT_DOMAIN_INVALID Bot domain invalid.
BOT_GAMES_DISABLED Bot games cannot be used in this type of chat
-BOT_GROUPS_BLOCKED This bot can't be added to groups
-BOT_INLINE_DISABLED The inline feature of the bot is disabled
-BOT_INVALID This is not a valid bot
+BOT_GROUPS_BLOCKED This bot can't be added to groups.
+BOT_INLINE_DISABLED This bot can't be used in inline mode.
+BOT_INVALID This is not a valid bot.
BOT_METHOD_INVALID The method can't be used by bots
-BOT_MISSING This method can only be run by a bot
-BOT_ONESIDE_NOT_AVAIL Bots can't pin messages for one side only in private chats
-BOT_PAYMENTS_DISABLED This method can only be run by a bot
+BOT_MISSING Only bots can call this method, please use [@stickers](https://t.me/stickers) if you're a user.
+BOT_ONESIDE_NOT_AVAIL Bots can't pin messages in PM just for themselves.
+BOT_PAYMENTS_DISABLED Please enable bot payments in botfather before calling this method.
BOT_POLLS_DISABLED Sending polls by bots has been disabled
-BOT_RESPONSE_TIMEOUT The bot did not answer to the callback query in time
-BOT_SCORE_NOT_MODIFIED The bot score was not modified
-BROADCAST_CALLS_DISABLED Broadcast calls disabled
-BROADCAST_ID_INVALID The channel is invalid
-BROADCAST_PUBLIC_VOTERS_FORBIDDEN Polls with public voters cannot be sent in channels
-BROADCAST_REQUIRED The request can only be used with a channel
-BUTTON_DATA_INVALID The button callback data is invalid or too large
-BUTTON_TEXT_INVALID The specified button text is invalid
-BUTTON_TYPE_INVALID The type of one of the buttons you provided is invalid
-BUTTON_URL_INVALID The button url is invalid
-BUTTON_USER_PRIVACY_RESTRICTED The privacy settings of the user specified in a keyboard button do not allow creating such button
-CALL_ALREADY_ACCEPTED The call is already accepted
-CALL_ALREADY_DECLINED The call is already declined
-CALL_PEER_INVALID The provided call peer object is invalid
-CALL_PROTOCOL_FLAGS_INVALID Call protocol flags invalid
-CDN_METHOD_INVALID The method can't be used on CDN DCs
-CHANNELS_ADMIN_LOCATED_TOO_MUCH The user has reached the limit of public geogroups
-CHANNELS_ADMIN_PUBLIC_TOO_MUCH You are an administrator of too many public channels
-CHANNELS_TOO_MUCH You have joined too many channels or supergroups, leave some and try again
+BOT_RESPONSE_TIMEOUT A timeout occurred while fetching data from the bot.
+BOT_SCORE_NOT_MODIFIED The score wasn't modified.
+BOT_WEBVIEW_DISABLED A webview cannot be opened in the specified conditions: emitted for example if `from_bot_menu` or `url` are set and `peer` is not the chat with the bot.
+BROADCAST_ID_INVALID Broadcast ID invalid.
+BROADCAST_PUBLIC_VOTERS_FORBIDDEN You can't forward polls with public voters.
+BROADCAST_REQUIRED This method can only be called on a channel, please use stats.getMegagroupStats for supergroups.
+BUTTON_DATA_INVALID The data of one or more of the buttons you provided is invalid.
+BUTTON_ID_INVALID The button_id parameter is invalid
+BUTTON_TEXT_INVALID The specified button text is invalid.
+BUTTON_TYPE_INVALID The type of one or more of the buttons you provided is invalid.
+BUTTON_URL_INVALID Button URL invalid.
+BUTTON_USER_INVALID The user_id passed to inputKeyboardButtonUserProfile is invalid
+BUTTON_USER_PRIVACY_RESTRICTED The privacy setting of the user specified in a [inputKeyboardButtonUserProfile](/constructor/inputKeyboardButtonUserProfile) button do not allow creating such a button.
+CALL_ALREADY_ACCEPTED The call was already accepted.
+CALL_ALREADY_DECLINED The call was already declined.
+CALL_OCCUPY_FAILED The call failed because the user is already making another call.
+CALL_PEER_INVALID The provided call peer object is invalid.
+CALL_PROTOCOL_FLAGS_INVALID Call protocol flags invalid.
+CDN_METHOD_INVALID You can't call this method in a CDN DC.
+CHANNELS_ADMIN_LOCATED_TOO_MUCH The user has reached the limit of public geogroups.
+CHANNELS_ADMIN_PUBLIC_TOO_MUCH You're admin of too many public channels, make some channels private to change the username of this channel.
+CHANNELS_TOO_MUCH You have joined too many channels/supergroups.
CHANNEL_ADD_INVALID Internal error.
CHANNEL_BANNED The channel is banned
-CHANNEL_INVALID The channel parameter is invalid
-CHANNEL_PARICIPANT_MISSING The current user is not in the channel
-CHANNEL_PRIVATE The channel/supergroup is not accessible
-CHANNEL_TOO_BIG The channel too big
-CHANNEL_TOO_LARGE The channel is too large
-CHAT_ABOUT_NOT_MODIFIED The chat about text was not modified because you tried to edit it using the same content
-CHAT_ABOUT_TOO_LONG The chat about text is too long
-CHAT_ADMIN_REQUIRED The method requires chat admin privileges
-CHAT_DISCUSSION_UNALLOWED The chat discussion is not allowed
-CHAT_FORWARDS_RESTRICTED The chat restricts forwarding content
-CHAT_ID_EMPTY The provided chat id is empty
-CHAT_ID_INVALID The chat id being used is invalid or not known yet. Make sure you see the chat before interacting with it
-CHAT_INVALID The chat is invalid
-CHAT_INVITE_PERMANENT The chat invite link is primary
-CHAT_LINK_EXISTS The action failed because the supergroup is linked to a channel
-CHAT_NOT_MODIFIED The chat settings (title, permissions, photo, etc..) were not modified because you tried to edit them using the same content
-CHAT_RESTRICTED The chat is restricted and cannot be used
-CHAT_REVOKE_DATE_UNSUPPORTED `min_date` and `max_date` are not available for using with non-user peers
-CHAT_SEND_INLINE_FORBIDDEN You cannot use inline bots to send messages in this chat
-CHAT_TITLE_EMPTY The chat title is empty
-CHAT_TOO_BIG The chat is too big for this action
-CODE_EMPTY The provided code is empty
-CODE_HASH_INVALID The provided code hash invalid
-CODE_INVALID The provided code is invalid (i.e. from email)
-CONNECTION_API_ID_INVALID The provided API id is invalid
-CONNECTION_APP_VERSION_EMPTY App version is empty
+CHANNEL_FORUM_MISSING This supergroup is not a forum.
+CHANNEL_ID_INVALID The specified supergroup ID is invalid.
+CHANNEL_INVALID The provided channel is invalid.
+CHANNEL_PARICIPANT_MISSING The current user is not in the channel.
+CHANNEL_PRIVATE You haven't joined this channel/supergroup.
+CHANNEL_TOO_BIG This channel has too many participants (>1000) to be deleted.
+CHANNEL_TOO_LARGE Channel is too large to be deleted; this error is issued when trying to delete channels with more than 1000 members (subject to change).
+CHATLIST_EXCLUDE_INVALID The specified `exclude_peers` are invalid.
+CHAT_ABOUT_NOT_MODIFIED About text has not changed.
+CHAT_ABOUT_TOO_LONG Chat about too long.
+CHAT_ADMIN_REQUIRED You must be an admin in this chat to do this.
+CHAT_DISCUSSION_UNALLOWED You can't enable forum topics in a discussion group linked to a channel.
+CHAT_FORWARDS_RESTRICTED You can't forward messages from a protected chat.
+CHAT_ID_EMPTY The provided chat ID is empty.
+CHAT_ID_INVALID The provided chat id is invalid.
+CHAT_INVALID Invalid chat.
+CHAT_INVITE_PERMANENT You can't set an expiration date on permanent invite links.
+CHAT_LINK_EXISTS The chat is public, you can't hide the history to new users.
+CHAT_NOT_MODIFIED No changes were made to chat information because the new information you passed is identical to the current information.
+CHAT_PUBLIC_REQUIRED You can only enable join requests in public groups.
+CHAT_RESTRICTED You can't send messages in this chat, you were restricted.
+CHAT_REVOKE_DATE_UNSUPPORTED `min_date` and `max_date` are not available for using with non-user peers.
+CHAT_SEND_INLINE_FORBIDDEN You can't send inline messages in this group.
+CHAT_TITLE_EMPTY No chat title provided.
+CHAT_TOO_BIG This method is not available for groups with more than `chat_read_mark_size_threshold` members, [see client configuration »](https://core.telegram.org/api/config#client-configuration).
+CODE_EMPTY The provided code is empty.
+CODE_HASH_INVALID Code hash invalid.
+CODE_INVALID Code invalid.
+COLOR_INVALID The specified color palette ID was invalid.
+CONNECTION_API_ID_INVALID The provided API id is invalid.
+CONNECTION_APP_VERSION_EMPTY App version is empty.
CONNECTION_DEVICE_MODEL_EMPTY The device model is empty
CONNECTION_LANG_PACK_INVALID The specified language pack is not valid
-CONNECTION_LAYER_INVALID The connection layer is invalid. Missing InvokeWithLayer-InitConnection call
+CONNECTION_LAYER_INVALID Layer invalid.
CONNECTION_NOT_INITED The connection was not initialized
CONNECTION_SYSTEM_EMPTY The connection to the system is empty
CONNECTION_SYSTEM_LANG_CODE_EMPTY The system language code is empty
-CONTACT_ADD_MISSING Contact to add is missing
-CONTACT_ID_INVALID The provided contact id is invalid
-CONTACT_NAME_EMPTY The provided contact name is empty
-CONTACT_REQ_MISSING Missing contact request
-CREATE_CALL_FAILED An error occurred while creating the call
-CURRENCY_TOTAL_AMOUNT_INVALID The total amount of all prices is invalid
-DATA_INVALID The encrypted data is invalid
-DATA_JSON_INVALID The provided JSON data is invalid
-DATA_TOO_LONG Data too long
-DATE_EMPTY The date argument is empty
-DC_ID_INVALID The dc_id parameter is invalid
-DH_G_A_INVALID The g_a parameter invalid
-DOCUMENT_INVALID The document is invalid
-EMAIL_HASH_EXPIRED The email hash expired and cannot be used to verify it
-EMAIL_INVALID The email provided is invalid
-EMAIL_UNCONFIRMED Email unconfirmed
-EMAIL_UNCONFIRMED_X The provided email isn't confirmed, {value} is the length of the verification code that was just sent to the email
-EMAIL_VERIFY_EXPIRED The verification email has expired
-EMOJI_INVALID The specified theme emoji is valid
-EMOJI_NOT_MODIFIED The theme wasn't changed
-EMOTICON_EMPTY The emoticon parameter is empty
-EMOTICON_INVALID The emoticon parameter is invalid
-EMOTICON_STICKERPACK_MISSING The emoticon sticker pack you are trying to obtain is missing
-ENCRYPTED_MESSAGE_INVALID The special binding message (bind_auth_key_inner) contains invalid data
-ENCRYPTION_ALREADY_ACCEPTED The secret chat is already accepted
-ENCRYPTION_ALREADY_DECLINED The secret chat is already declined
-ENCRYPTION_DECLINED The secret chat was declined
-ENCRYPTION_ID_INVALID The provided secret chat id is invalid
-ENTITIES_TOO_LONG The entity provided contains data that is too long, or you passed too many entities to this message
-ENTITY_BOUNDS_INVALID The message entity bounds are invalid
-ENTITY_MENTION_USER_INVALID The mentioned entity is not an user
-ERROR_TEXT_EMPTY The provided error message is empty
-EXPIRE_DATE_INVALID The expiration date is invalid
-EXPIRE_FORBIDDEN Expire forbidden
-EXPORT_CARD_INVALID The provided card is invalid
-EXTERNAL_URL_INVALID The external media URL is invalid
+CONTACT_ADD_MISSING Contact to add is missing.
+CONTACT_ID_INVALID The provided contact ID is invalid.
+CONTACT_MISSING The specified user is not a contact.
+CONTACT_NAME_EMPTY Contact name empty.
+CONTACT_REQ_MISSING Missing contact request.
+CREATE_CALL_FAILED An error occurred while creating the call.
+CURRENCY_TOTAL_AMOUNT_INVALID The total amount of all prices is invalid.
+CUSTOM_REACTIONS_TOO_MANY Too many custom reactions were specified.
+DATA_INVALID Encrypted data invalid.
+DATA_JSON_INVALID The provided JSON data is invalid.
+DATA_TOO_LONG Data too long.
+DATE_EMPTY Date empty.
+DC_ID_INVALID The provided DC ID is invalid.
+DH_G_A_INVALID g_a invalid.
+DOCUMENT_INVALID The specified document is invalid.
+EMAIL_HASH_EXPIRED Email hash expired.
+EMAIL_INVALID The specified email is invalid.
+EMAIL_NOT_SETUP In order to change the login email with emailVerifyPurposeLoginChange, an existing login email must already be set using emailVerifyPurposeLoginSetup.
+EMAIL_UNCONFIRMED Email unconfirmed.
+EMAIL_UNCONFIRMED_X The provided email isn't confirmed, {value} is the length of the verification code that was just sent to the email: use [account.verifyEmail](https://core.telegram.org/method/account.verifyEmail) to enter the received verification code and enable the recovery email.
+EMAIL_VERIFY_EXPIRED The verification email has expired.
+EMOJI_INVALID The specified theme emoji is valid.
+EMOJI_MARKUP_INVALID The specified `video_emoji_markup` was invalid.
+EMOJI_NOT_MODIFIED The theme wasn't changed.
+EMOTICON_EMPTY The emoji is empty.
+EMOTICON_INVALID The specified emoji is invalid.
+EMOTICON_STICKERPACK_MISSING inputStickerSetDice.emoji cannot be empty.
+ENCRYPTED_MESSAGE_INVALID Encrypted message invalid.
+ENCRYPTION_ALREADY_ACCEPTED Secret chat already accepted.
+ENCRYPTION_ALREADY_DECLINED The secret chat was already declined.
+ENCRYPTION_DECLINED The secret chat was declined.
+ENCRYPTION_ID_INVALID The provided secret chat ID is invalid.
+ENTITIES_TOO_LONG You provided too many styled message entities.
+ENTITY_BOUNDS_INVALID A specified [entity offset or length](/api/entities#entity-length) is invalid, see [here »](/api/entities#entity-length) for info on how to properly compute the entity offset/length.
+ENTITY_MENTION_USER_INVALID You mentioned an invalid user.
+ERROR_TEXT_EMPTY The provided error message is empty.
+EXPIRE_DATE_INVALID The specified expiration date is invalid.
+EXPORT_CARD_INVALID Provided card is invalid.
+EXTERNAL_URL_INVALID External URL invalid.
FIELD_NAME_EMPTY The field with the name FIELD_NAME is missing
FIELD_NAME_INVALID The field with the name FIELD_NAME is invalid
-FILE_CONTENT_TYPE_INVALID File content-type is invalid
-FILE_EMTPY An empty file was provided
-FILE_ID_INVALID The file id is invalid
+FILE_CONTENT_TYPE_INVALID File content-type is invalid.
+FILE_EMTPY An empty file was provided.
+FILE_ID_INVALID The provided file id is invalid.
FILE_MIGRATE_X The file is in Data Center No. {value}
-FILE_PARTS_INVALID Invalid number of parts.
-FILE_PART_0_MISSING File part 0 missing
-FILE_PART_EMPTY The file part sent is empty
+FILE_PARTS_INVALID The number of file parts is invalid.
+FILE_PART_EMPTY The provided file part is empty.
FILE_PART_INVALID The file part number is invalid.
-FILE_PART_LENGTH_INVALID The length of a file part is invalid
-FILE_PART_SIZE_CHANGED The part size is different from the size of one of the previous parts in the same file
-FILE_PART_SIZE_INVALID The file part size is invalid
-FILE_PART_TOO_BIG The size limit for the content of the file part has been exceeded
+FILE_PART_LENGTH_INVALID The length of a file part is invalid.
+FILE_PART_SIZE_CHANGED Provided file part size has changed.
+FILE_PART_SIZE_INVALID The provided file part size is invalid.
+FILE_PART_TOO_BIG The uploaded file part is too big.
FILE_PART_X_MISSING Part {value} of the file is missing from storage
-FILE_REFERENCE_EMPTY The file id contains an empty file reference, you must obtain a valid one by fetching the message from the origin context
-FILE_REFERENCE_EXPIRED The file id contains an expired file reference, you must obtain a valid one by fetching the message from the origin context
-FILE_REFERENCE_INVALID The file id contains an invalid file reference, you must obtain a valid one by fetching the message from the origin context
-FILE_TITLE_EMPTY An empty file title was specified
-FILTER_ID_INVALID The specified filter ID is invalid
-FILTER_INCLUDE_EMPTY The filter include is empty
-FILTER_NOT_SUPPORTED The specified filter cannot be used in this context
-FILTER_TITLE_EMPTY The title field of the filter is empty
-FIRSTNAME_INVALID The first name is invalid
-FOLDER_ID_EMPTY The folder you tried to delete was already empty
-FOLDER_ID_INVALID The folder id is invalid
-FRESH_CHANGE_ADMINS_FORBIDDEN You can't change administrator settings in this chat because your session was logged-in recently
-FROM_MESSAGE_BOT_DISABLED Bots can't use fromMessage min constructors
-FROM_PEER_INVALID The from peer value is invalid
-GAME_BOT_INVALID You cannot send that game with the current bot
-GEO_POINT_INVALID Invalid geo point provided
-GIF_CONTENT_TYPE_INVALID GIF content-type invalid
-GIF_ID_INVALID The provided gif/animation id is invalid
-GRAPH_EXPIRED_RELOAD This graph has expired, please obtain a new graph token
-GRAPH_INVALID_RELOAD Invalid graph token provided, please reload the stats and provide the updated token
-GRAPH_OUTDATED_RELOAD The graph data is outdated
-GROUPCALL_ALREADY_DISCARDED The group call was already discarded
-GROUPCALL_INVALID The specified group call is invalid
-GROUPCALL_JOIN_MISSING You haven't joined this group call
-GROUPCALL_NOT_MODIFIED Group call settings weren't modified
-GROUPCALL_SSRC_DUPLICATE_MUCH Too many group call synchronization source duplicates
-GROUPED_MEDIA_INVALID The album contains invalid media
+FILE_REFERENCE_EMPTY An empty [file reference](https://core.telegram.org/api/file_reference) was specified.
+FILE_REFERENCE_EXPIRED File reference expired, it must be refetched as described in [the documentation](https://core.telegram.org/api/file_reference).
+FILE_REFERENCE_INVALID The specified [file reference](https://core.telegram.org/api/file_reference) is invalid.
+FILE_TITLE_EMPTY An empty file title was specified.
+FILE_TOKEN_INVALID The specified file token is invalid.
+FILTER_ID_INVALID The specified filter ID is invalid.
+FILTER_INCLUDE_EMPTY The include_peers vector of the filter is empty.
+FILTER_NOT_SUPPORTED The specified filter cannot be used in this context.
+FILTER_TITLE_EMPTY The title field of the filter is empty.
+FIRSTNAME_INVALID The first name is invalid.
+FOLDER_ID_EMPTY An empty folder ID was specified.
+FOLDER_ID_INVALID Invalid folder ID.
+FORUM_ENABLED You can't execute the specified action because the group is a [forum](https://core.telegram.org/api/forum), disable forum functionality to continue.
+FRESH_CHANGE_ADMINS_FORBIDDEN You were just elected admin, you can't add or modify other admins yet.
+FROM_MESSAGE_BOT_DISABLED Bots can't use fromMessage min constructors.
+FROM_PEER_INVALID The specified from_id is invalid.
+GAME_BOT_INVALID Bots can't send another bot's game.
+GENERAL_MODIFY_ICON_FORBIDDEN You can't modify the icon of the "General" topic.
+GEO_POINT_INVALID Invalid geoposition provided.
+GIFT_SLUG_EXPIRED The specified gift slug has expired.
+GIFT_SLUG_INVALID The specified slug is invalid.
+GIF_CONTENT_TYPE_INVALID GIF content-type invalid.
+GIF_ID_INVALID The provided GIF ID is invalid.
+GRAPH_EXPIRED_RELOAD This graph has expired, please obtain a new graph token.
+GRAPH_INVALID_RELOAD Invalid graph token provided, please reload the stats and provide the updated token.
+GRAPH_OUTDATED_RELOAD The graph is outdated, please get a new async token using stats.getBroadcastStats.
+GROUPCALL_ALREADY_DISCARDED The group call was already discarded.
+GROUPCALL_FORBIDDEN The group call has already ended.
+GROUPCALL_INVALID The specified group call is invalid.
+GROUPCALL_JOIN_MISSING You haven't joined this group call.
+GROUPCALL_NOT_MODIFIED Group call settings weren't modified.
+GROUPCALL_SSRC_DUPLICATE_MUCH The app needs to retry joining the group call with a new SSRC value.
+GROUPED_MEDIA_INVALID Invalid grouped media.
GROUP_CALL_INVALID The group call is invalid
-HASH_INVALID The provided hash is invalid
-HIDE_REQUESTER_MISSING The join request was missing or was already handled
-IMAGE_PROCESS_FAILED The server failed to process your image
-IMPORT_FILE_INVALID The imported file is invalid
-IMPORT_FORMAT_UNRECOGNIZED The imported format is unrecognized
-IMPORT_ID_INVALID The import id is invalid
-INLINE_RESULT_EXPIRED The inline bot query expired
+HASH_INVALID The provided hash is invalid.
+HIDE_REQUESTER_MISSING The join request was missing or was already handled.
+IMAGE_PROCESS_FAILED Failure while processing image.
+IMPORT_FILE_INVALID The specified chat export file is invalid.
+IMPORT_FORMAT_UNRECOGNIZED The specified chat export file was exported from an unsupported chat app.
+IMPORT_ID_INVALID The specified import ID is invalid.
+IMPORT_TOKEN_INVALID The specified token is invalid.
+INLINE_RESULT_EXPIRED The inline query expired.
+INPUT_CHATLIST_INVALID The specified folder is invalid.
INPUT_CONSTRUCTOR_INVALID The provided constructor is invalid
INPUT_FETCH_ERROR An error occurred while deserializing TL parameters
INPUT_FETCH_FAIL Failed deserializing TL payload
-INPUT_FILTER_INVALID The filter is invalid for this query
+INPUT_FILTER_INVALID The specified filter is invalid.
INPUT_LAYER_INVALID The provided layer is invalid
INPUT_METHOD_INVALID The method invoked is invalid in the current schema
INPUT_REQUEST_TOO_LONG The input request is too long
-INPUT_TEXT_EMPTY The specified text is empty
-INPUT_USER_DEACTIVATED The target user has been deleted/deactivated
-INVITE_FORBIDDEN_WITH_JOINAS If the user has anonymously joined a group call as a channel, they can't invite other users to the group call because that would cause deanonymization, because the invite would be sent using the original user ID, not the anonymized channel ID
-INVITE_HASH_EMPTY The invite hash is empty
-INVITE_HASH_EXPIRED The chat invite link is no longer valid
-INVITE_HASH_INVALID The invite link hash is invalid
-INVITE_REQUEST_SENT The request to join this chat or channel has been successfully sent
-INVITE_REVOKED_MISSING The action required a chat invite link to be revoked first
-INVITE_SLUG_EMPTY The invite slug is empty
-INVITE_SLUG_EXPIRED The invite slug is expired
-INVOICE_PAYLOAD_INVALID The specified invoice payload is invalid
-JOIN_AS_PEER_INVALID The specified peer cannot be used to join a group call
-LANG_CODE_INVALID The specified language code is invalid
-LANG_CODE_NOT_SUPPORTED The specified language code is not supported
-LANG_PACK_INVALID The provided language pack is invalid
-LASTNAME_INVALID The last name is invalid
-LIMIT_INVALID The limit parameter is invalid
-LINK_NOT_MODIFIED The chat link was not modified because you tried to link to the same target
-LOCATION_INVALID The file location is invalid
-MAX_DATE_INVALID The specified maximum date is invalid
-MAX_ID_INVALID The max_id parameter is invalid
-MAX_QTS_INVALID The provided QTS is invalid
-MD5_CHECKSUM_INVALID The file's checksum did not match the md5_checksum parameter
-MEDIA_CAPTION_TOO_LONG The media caption is too long
-MEDIA_EMPTY The media you tried to send is invalid
-MEDIA_FILE_INVALID The provided media file is invalid
-MEDIA_GROUPED_INVALID You tried to send media of different types in an album
-MEDIA_INVALID The media is invalid
-MEDIA_NEW_INVALID The new media to edit the message with is invalid
-MEDIA_PREV_INVALID The previous media cannot be edited with anything else
-MEDIA_TTL_INVALID The media ttl is invalid
-MEDIA_VIDEO_STORY_MISSING The media does not have a photo or a video
-MEGAGROUP_ID_INVALID The supergroup is invalid
-MEGAGROUP_PREHISTORY_HIDDEN The action failed because the supergroup has the pre-history hidden
-MEGAGROUP_REQUIRED The request can only be used with a supergroup
-MESSAGE_EDIT_TIME_EXPIRED You can no longer edit this message because too much time has passed
-MESSAGE_EMPTY The message sent is empty or contains invalid characters
-MESSAGE_IDS_EMPTY The requested message doesn't exist or you provided no message id
-MESSAGE_ID_INVALID The message id is invalid
-MESSAGE_NOT_MODIFIED The message was not modified because you tried to edit it using the same content
-MESSAGE_POLL_CLOSED You can't interact with a closed poll
-MESSAGE_TOO_LONG The message text is too long
-METHOD_INVALID The API method is invalid and cannot be used
-MIN_DATE_INVALID The specified minimum date is invalid
-MSG_ID_INVALID The message ID used in the peer was invalid
-MSG_TOO_OLD chat_read_mark_expire_period have passed since the message was sent, read receipts were deleted
+INPUT_TEXT_EMPTY The specified text is empty.
+INPUT_TEXT_TOO_LONG The specified text is too long.
+INPUT_USER_DEACTIVATED The specified user was deleted.
+INVITES_TOO_MUCH The maximum number of per-folder invites specified by the `chatlist_invites_limit_default`/`chatlist_invites_limit_premium` [client configuration parameters »](/api/config#chatlist-invites-limit-default) was reached.
+INVITE_FORBIDDEN_WITH_JOINAS If the user has anonymously joined a group call as a channel, they can't invite other users to the group call because that would cause deanonymization, because the invite would be sent using the original user ID, not the anonymized channel ID.
+INVITE_HASH_EMPTY The invite hash is empty.
+INVITE_HASH_EXPIRED The invite link has expired.
+INVITE_HASH_INVALID The invite hash is invalid.
+INVITE_REQUEST_SENT You have successfully requested to join this chat or channel.
+INVITE_REVOKED_MISSING The specified invite link was already revoked or is invalid.
+INVITE_SLUG_EMPTY The specified invite slug is empty.
+INVITE_SLUG_EXPIRED The specified chat folder link has expired.
+INVOICE_PAYLOAD_INVALID The specified invoice payload is invalid.
+JOIN_AS_PEER_INVALID The specified peer cannot be used to join a group call.
+LANG_CODE_INVALID The specified language code is invalid.
+LANG_CODE_NOT_SUPPORTED The specified language code is not supported.
+LANG_PACK_INVALID The provided language pack is invalid.
+LASTNAME_INVALID The last name is invalid.
+LIMIT_INVALID The provided limit is invalid.
+LINK_NOT_MODIFIED Discussion link not modified.
+LOCATION_INVALID The provided location is invalid.
+MAX_DATE_INVALID The specified maximum date is invalid.
+MAX_ID_INVALID The provided max ID is invalid.
+MAX_QTS_INVALID The specified max_qts is invalid.
+MD5_CHECKSUM_INVALID The MD5 checksums do not match.
+MEDIA_CAPTION_TOO_LONG The caption is too long.
+MEDIA_EMPTY The provided media object is invalid.
+MEDIA_FILE_INVALID The specified media file is invalid.
+MEDIA_GROUPED_INVALID You tried to send media of different types in an album.
+MEDIA_INVALID Media invalid.
+MEDIA_NEW_INVALID The new media is invalid.
+MEDIA_PREV_INVALID Previous media invalid.
+MEDIA_TTL_INVALID The specified media TTL is invalid.
+MEDIA_TYPE_INVALID The specified media type cannot be used in stories.
+MEDIA_VIDEO_STORY_MISSING
+MEGAGROUP_GEO_REQUIRED This method can only be invoked on a geogroup.
+MEGAGROUP_ID_INVALID Invalid supergroup ID.
+MEGAGROUP_PREHISTORY_HIDDEN Group with hidden history for new members can't be set as discussion groups.
+MEGAGROUP_REQUIRED You can only use this method on a supergroup.
+MESSAGE_EDIT_TIME_EXPIRED You can't edit this message anymore, too much time has passed since its creation.
+MESSAGE_EMPTY The provided message is empty.
+MESSAGE_IDS_EMPTY No message ids were provided.
+MESSAGE_ID_INVALID The provided message id is invalid.
+MESSAGE_NOT_MODIFIED The provided message data is identical to the previous message data, the message wasn't modified.
+MESSAGE_POLL_CLOSED Poll closed.
+MESSAGE_TOO_LONG The provided message is too long.
+METHOD_INVALID The specified method is invalid.
+MIN_DATE_INVALID The specified minimum date is invalid.
+MSG_ID_INVALID Invalid message ID provided.
+MSG_TOO_OLD [`chat_read_mark_expire_period` seconds](https://core.telegram.org/api/config#chat-read-mark-expire-period) have passed since the message was sent, read receipts were deleted.
MSG_VOICE_MISSING The message does not contain a voice message
-MSG_WAIT_FAILED A waiting call returned an error
-MULTI_MEDIA_TOO_LONG The album/media group contains too many items
-NEW_SALT_INVALID The new salt is invalid
-NEW_SETTINGS_EMPTY No password is set on the current account, and no new password was specified in `new_settings`
-NEW_SETTINGS_INVALID The new settings are invalid
-NEXT_OFFSET_INVALID The next offset value is invalid
-OFFSET_INVALID The offset parameter is invalid
-OFFSET_PEER_ID_INVALID The provided offset peer is invalid
-OPTIONS_TOO_MUCH The poll options are too many
-OPTION_INVALID The option specified is invalid and does not exist in the target poll
-PACK_SHORT_NAME_INVALID Invalid sticker pack name. It must begin with a letter, can't contain consecutive underscores and must end in '_by_'.
-PACK_SHORT_NAME_OCCUPIED A sticker pack with this name already exists
-PACK_TITLE_INVALID The sticker pack title is invalid
-PARTICIPANTS_TOO_FEW The chat doesn't have enough participants
-PARTICIPANT_ID_INVALID The specified participant ID is invalid
-PARTICIPANT_JOIN_MISSING Trying to enable a presentation, when the user hasn't joined the Video Chat with phone.joinGroupCall
-PARTICIPANT_VERSION_OUTDATED The other participant is using an outdated Telegram app version
-PASSWORD_EMPTY The password provided is empty
-PASSWORD_HASH_INVALID The two-step verification password is invalid
-PASSWORD_MISSING The account is missing the two-step verification password
-PASSWORD_RECOVERY_NA The password recovery e-mail is not available
-PASSWORD_REQUIRED The two-step verification password is required for this method
-PASSWORD_TOO_FRESH_X The two-step verification password was added recently and you are required to wait {value} seconds
-PAYMENT_PROVIDER_INVALID The payment provider was not recognised or its token was invalid
+MSG_WAIT_FAILED A waiting call returned an error.
+MULTI_MEDIA_TOO_LONG Too many media files for album.
+NEW_SALT_INVALID The new salt is invalid.
+NEW_SETTINGS_EMPTY No password is set on the current account, and no new password was specified in `new_settings`.
+NEW_SETTINGS_INVALID The new password settings are invalid.
+NEXT_OFFSET_INVALID The specified offset is longer than 64 bytes.
+NOGENERAL_HIDE_FORBIDDEN The hidden parameter is only valid for the General topic message_thread_id=1
+OFFSET_INVALID The provided offset is invalid.
+OFFSET_PEER_ID_INVALID The provided offset peer is invalid.
+OPTIONS_TOO_MUCH Too many options provided.
+OPTION_INVALID Invalid option selected.
+ORDER_INVALID The specified username order is invalid.
+PACK_SHORT_NAME_INVALID Short pack name invalid.
+PACK_SHORT_NAME_OCCUPIED A stickerpack with this name already exists.
+PACK_TITLE_INVALID The stickerpack title is invalid.
+PARTICIPANTS_TOO_FEW Not enough participants.
+PARTICIPANT_ID_INVALID The specified participant ID is invalid.
+PARTICIPANT_JOIN_MISSING Trying to enable a presentation, when the user hasn't joined the Video Chat with [phone.joinGroupCall](https://core.telegram.org/method/phone.joinGroupCall).
+PARTICIPANT_VERSION_OUTDATED The other participant does not use an up to date telegram client with support for calls.
+PASSWORD_EMPTY The provided password is empty.
+PASSWORD_HASH_INVALID The provided password hash is invalid.
+PASSWORD_MISSING You must enable 2FA in order to transfer ownership of a channel.
+PASSWORD_RECOVERY_EXPIRED The recovery code has expired.
+PASSWORD_RECOVERY_NA No email was set, can't recover password via email.
+PASSWORD_REQUIRED A [2FA password](https://core.telegram.org/api/srp) must be configured to use Telegram Passport.
+PASSWORD_TOO_FRESH_X The password was modified less than 24 hours ago, try again in {value} seconds.
+PAYMENT_PROVIDER_INVALID The specified payment provider is invalid.
+PEERS_LIST_EMPTY The specified list of peers is empty.
PEER_FLOOD The method can't be used because your account is currently limited
-PEER_HISTORY_EMPTY Peer history empty
-PEER_ID_INVALID The peer id being used is invalid or not known yet. Make sure you meet the peer before interacting with it
-PEER_ID_NOT_SUPPORTED The provided peer id is not supported
-PERSISTENT_TIMESTAMP_EMPTY The pts argument is empty
-PERSISTENT_TIMESTAMP_INVALID The persistent timestamp is invalid
-PHONE_CODE_EMPTY The phone code is missing
-PHONE_CODE_EXPIRED The confirmation code has expired
-PHONE_CODE_HASH_EMPTY The phone code hash is missing
-PHONE_CODE_INVALID The confirmation code is invalid
-PHONE_HASH_EXPIRED An invalid or expired phone_code_hash was provided
-PHONE_NOT_OCCUPIED No user is associated to the specified phone number
-PHONE_NUMBER_APP_SIGNUP_FORBIDDEN You can't sign up using this app
-PHONE_NUMBER_BANNED The phone number is banned from Telegram and cannot be used
-PHONE_NUMBER_FLOOD This number has tried to login too many times
-PHONE_NUMBER_INVALID The phone number is invalid
-PHONE_NUMBER_OCCUPIED The phone number is already in use
-PHONE_NUMBER_UNOCCUPIED The phone number is not yet being used
-PHONE_PASSWORD_PROTECTED The phone is password protected
-PHOTO_CONTENT_TYPE_INVALID The photo content type is invalid
-PHOTO_CONTENT_URL_EMPTY The photo content URL is empty
-PHOTO_CROP_FILE_MISSING Photo crop file missing
-PHOTO_CROP_SIZE_SMALL The photo is too small
-PHOTO_EXT_INVALID The photo extension is invalid
-PHOTO_FILE_MISSING Profile photo file missing
-PHOTO_ID_INVALID The photo id is invalid
-PHOTO_INVALID The photo is invalid
-PHOTO_INVALID_DIMENSIONS The photo dimensions are invalid
-PHOTO_SAVE_FILE_INVALID The photo you tried to send cannot be saved by Telegram
-PHOTO_THUMB_URL_EMPTY The photo thumb URL is empty
+PEER_HISTORY_EMPTY You can't pin an empty chat with a user.
+PEER_ID_INVALID The provided peer id is invalid.
+PEER_ID_NOT_SUPPORTED The provided peer ID is not supported.
+PERSISTENT_TIMESTAMP_EMPTY Persistent timestamp empty.
+PERSISTENT_TIMESTAMP_INVALID Persistent timestamp invalid.
+PHONE_CODE_EMPTY phone_code is missing.
+PHONE_CODE_EXPIRED The phone code you provided has expired.
+PHONE_CODE_HASH_EMPTY phone_code_hash is missing.
+PHONE_CODE_INVALID The provided phone code is invalid.
+PHONE_HASH_EXPIRED An invalid or expired `phone_code_hash` was provided.
+PHONE_NOT_OCCUPIED No user is associated to the specified phone number.
+PHONE_NUMBER_APP_SIGNUP_FORBIDDEN You can't sign up using this app.
+PHONE_NUMBER_BANNED The provided phone number is banned from telegram.
+PHONE_NUMBER_FLOOD You asked for the code too many times.
+PHONE_NUMBER_INVALID The phone number is invalid.
+PHONE_NUMBER_OCCUPIED The phone number is already in use.
+PHONE_NUMBER_UNOCCUPIED The phone number is not yet being used.
+PHONE_PASSWORD_PROTECTED This phone is password protected.
+PHOTO_CONTENT_TYPE_INVALID Photo mime-type invalid.
+PHOTO_CONTENT_URL_EMPTY Photo URL invalid.
+PHOTO_CROP_FILE_MISSING Photo crop file missing.
+PHOTO_CROP_SIZE_SMALL Photo is too small.
+PHOTO_EXT_INVALID The extension of the photo is invalid.
+PHOTO_FILE_MISSING Profile photo file missing.
+PHOTO_ID_INVALID Photo ID invalid.
+PHOTO_INVALID Photo invalid.
+PHOTO_INVALID_DIMENSIONS The photo dimensions are invalid.
+PHOTO_SAVE_FILE_INVALID Internal issues, try again later.
+PHOTO_THUMB_URL_EMPTY Photo thumbnail URL is empty.
PHOTO_THUMB_URL_INVALID The photo thumb URL is invalid
-PINNED_DIALOGS_TOO_MUCH Too many pinned dialogs
-PIN_RESTRICTED You can't pin messages in private chats with other people
-POLL_ANSWERS_INVALID The poll answers are invalid
-POLL_ANSWER_INVALID One of the poll answers is not acceptable
-POLL_OPTION_DUPLICATE A duplicate option was sent in the same poll
-POLL_OPTION_INVALID A poll option used invalid data (the data may be too long)
-POLL_QUESTION_INVALID The poll question is invalid
+PINNED_DIALOGS_TOO_MUCH Too many pinned dialogs.
+PIN_RESTRICTED You can't pin messages.
+PLATFORM_INVALID The provided platform is invalid. Allowed values are "android", "ios", "wp", "bb", "desktop", "web", "ubp", "other".
+POLL_ANSWERS_INVALID Invalid poll answers were provided.
+POLL_ANSWER_INVALID One of the poll answers is not acceptable.
+POLL_OPTION_DUPLICATE Duplicate poll options provided.
+POLL_OPTION_INVALID Invalid poll option provided.
+POLL_QUESTION_INVALID One of the poll questions is not acceptable.
POLL_UNSUPPORTED This layer does not support polls in the invoked method
POLL_VOTE_REQUIRED Cast a vote in the poll before calling this method
-PREMIUM_ACCOUNT_REQUIRED The method requires a premium user account
-PRIVACY_KEY_INVALID The privacy key is invalid
-PRIVACY_TOO_LONG Your privacy exception list has exceeded the maximum capacity
-PRIVACY_VALUE_INVALID The privacy value is invalid
-PUBLIC_KEY_REQUIRED A public key is required
-QUERY_ID_EMPTY The query ID is empty
-QUERY_ID_INVALID The callback query id is invalid
-QUERY_TOO_SHORT The query is too short
-QUIZ_ANSWER_MISSING You can forward a quiz while hiding the original author only after choosing an option in the quiz
-QUIZ_CORRECT_ANSWERS_EMPTY The correct answers of the quiz are empty
-QUIZ_CORRECT_ANSWERS_TOO_MUCH The quiz contains too many correct answers
-QUIZ_CORRECT_ANSWER_INVALID The correct answers of the quiz are invalid
-QUIZ_MULTIPLE_INVALID A quiz can't have multiple answers
-RANDOM_ID_EMPTY The random ID is empty
-RANDOM_ID_INVALID The provided random ID is invalid
-RANDOM_LENGTH_INVALID The random length is invalid
-RANGES_INVALID Invalid range provided
-REACTION_EMPTY The reaction provided is empty
-REACTION_INVALID Invalid reaction provided (only valid emoji are allowed)
+PREMIUM_ACCOUNT_REQUIRED A premium account is required to execute this action.
+PREMIUM_GIFTCODE_WAS_REFUNDED This gift code can't be redeemed because the giveaway organizer requested a refund
+PREMIUM_SUB_ACTIVE_UNTIL_X You already have a premium subscription active until unixtime {value} .
+PRIVACY_KEY_INVALID The privacy key is invalid.
+PRIVACY_TOO_LONG Too many privacy rules were specified, the current limit is 1000.
+PRIVACY_VALUE_INVALID The specified privacy rule combination is invalid.
+PUBLIC_KEY_REQUIRED A public key is required.
+QUERY_ID_EMPTY The query ID is empty.
+QUERY_ID_INVALID The query ID is invalid.
+QUERY_TOO_SHORT The query string is too short.
+QUIZ_ANSWER_MISSING You can forward a quiz while hiding the original author only after choosing an option in the quiz.
+QUIZ_CORRECT_ANSWERS_EMPTY No correct quiz answer was specified.
+QUIZ_CORRECT_ANSWERS_TOO_MUCH You specified too many correct answers in a quiz, quizzes can only have one right answer!
+QUIZ_CORRECT_ANSWER_INVALID An invalid value was provided to the correct_answers field.
+QUIZ_MULTIPLE_INVALID Quizzes can't have the multiple_choice flag set!
+QUOTE_TEXT_INVALID The quote_text is invalid
+RANDOM_ID_EMPTY Random ID empty.
+RANDOM_ID_INVALID A provided random ID is invalid.
+RANDOM_LENGTH_INVALID Random length invalid.
+RANGES_INVALID Invalid range provided.
+REACTIONS_TOO_MANY The message already has exactly `reactions_uniq_max` reaction emojis, you can't react with a new emoji, see [the docs for more info »](/api/config#client-configuration).
+REACTION_EMPTY Empty reaction provided.
+REACTION_INVALID The specified reaction is invalid.
REFLECTOR_NOT_AVAILABLE The call reflector is not available
-REPLY_MARKUP_BUY_EMPTY Reply markup for buy button empty
+REPLY_MARKUP_BUY_EMPTY Reply markup for buy button empty.
REPLY_MARKUP_GAME_EMPTY The provided reply markup for the game is empty
-REPLY_MARKUP_INVALID The provided reply markup is invalid
-REPLY_MARKUP_TOO_LONG The reply markup is too long
-REPLY_MESSAGE_ID_INVALID The reply message id is invalid
-RESET_REQUEST_MISSING No password reset is in progress
-RESULTS_TOO_MUCH The result contains too many items
-RESULT_ID_DUPLICATE The result contains items with duplicated identifiers
-RESULT_ID_EMPTY Result ID empty
-RESULT_ID_INVALID The given result cannot be used to send the selection to the bot
-RESULT_TYPE_INVALID The result type is invalid
-REVOTE_NOT_ALLOWED You cannot change your vote
-RIGHTS_NOT_MODIFIED The new admin rights are equal to the old rights, no change was made
-RSA_DECRYPT_FAILED Internal RSA decryption failed
-SCHEDULE_BOT_NOT_ALLOWED Bots are not allowed to schedule messages
-SCHEDULE_DATE_INVALID Invalid schedule date provided
-SCHEDULE_DATE_TOO_LATE The date you tried to schedule is too far in the future (more than one year)
-SCHEDULE_STATUS_PRIVATE You cannot schedule a message until the person comes online if their privacy does not show this information
-SCHEDULE_TOO_MUCH You tried to schedule too many messages in this chat
-SCORE_INVALID The specified game score is invalid
-SEARCH_QUERY_EMPTY The search query is empty
-SEARCH_WITH_LINK_NOT_SUPPORTED You cannot provide a search query and an invite link at the same time
-SECONDS_INVALID The seconds interval is invalid
-SEND_AS_PEER_INVALID You can't send messages as the specified peer
-SEND_MESSAGE_MEDIA_INVALID The message media is invalid
-SEND_MESSAGE_TYPE_INVALID The message type is invalid
-SESSION_TOO_FRESH_X You can't do this action because the current session was logged-in recently
-SETTINGS_INVALID Invalid settings were provided
-SHA256_HASH_INVALID The provided SHA256 hash is invalid
+REPLY_MARKUP_INVALID The provided reply markup is invalid.
+REPLY_MARKUP_TOO_LONG The specified reply_markup is too long.
+REPLY_MESSAGE_ID_INVALID The specified reply-to message ID is invalid.
+REPLY_TO_INVALID The specified `reply_to` field is invalid.
+REPLY_TO_USER_INVALID The replied-to user is invalid.
+RESET_REQUEST_MISSING No password reset is in progress.
+RESULTS_TOO_MUCH Too many results were provided.
+RESULT_ID_DUPLICATE You provided a duplicate result ID.
+RESULT_ID_EMPTY Result ID empty.
+RESULT_ID_INVALID One of the specified result IDs is invalid.
+RESULT_TYPE_INVALID Result type invalid.
+REVOTE_NOT_ALLOWED You cannot change your vote.
+RIGHTS_NOT_MODIFIED The new admin rights are equal to the old rights, no change was made.
+RSA_DECRYPT_FAILED Internal RSA decryption failed.
+SAVED_DIALOGS_UNSUPPORTED You cannot use this method
+SCHEDULE_BOT_NOT_ALLOWED Bots cannot schedule messages.
+SCHEDULE_DATE_INVALID Invalid schedule date provided.
+SCHEDULE_DATE_TOO_LATE You can't schedule a message this far in the future.
+SCHEDULE_STATUS_PRIVATE Can't schedule until user is online, if the user's last seen timestamp is hidden by their privacy settings.
+SCHEDULE_TOO_MUCH There are too many scheduled messages.
+SCORE_INVALID The specified game score is invalid.
+SEARCH_QUERY_EMPTY The search query is empty.
+SEARCH_WITH_LINK_NOT_SUPPORTED You cannot provide a search query and an invite link at the same time.
+SECONDS_INVALID Invalid duration provided.
+SEND_AS_PEER_INVALID You can't send messages as the specified peer.
+SEND_MESSAGE_MEDIA_INVALID Invalid media provided.
+SEND_MESSAGE_TYPE_INVALID The message type is invalid.
+SESSION_TOO_FRESH_X This session was created less than 24 hours ago, try again in {value} seconds.
+SETTINGS_INVALID Invalid settings were provided.
+SHA256_HASH_INVALID The provided SHA256 hash is invalid.
SHORTNAME_OCCUPY_FAILED An error occurred when trying to register the short-name used for the sticker pack. Try a different name
-SHORT_NAME_INVALID The specified short name is invalid
-SHORT_NAME_OCCUPIED The specified short name is already in use
-SLOWMODE_MULTI_MSGS_DISABLED Slowmode is enabled, you cannot forward multiple messages to this group
-SMS_CODE_CREATE_FAILED An error occurred while creating the SMS code
-SRP_ID_INVALID Invalid SRP ID provided
-SRP_PASSWORD_CHANGED The password has changed
-START_PARAM_EMPTY The start parameter is empty
-START_PARAM_INVALID The start parameter is invalid
-START_PARAM_TOO_LONG The start parameter is too long
-STICKERPACK_STICKERS_TOO_MUCH There are too many stickers in this stickerpack, you can't add any more
-STICKERSET_INVALID The requested sticker set is invalid
+SHORT_NAME_INVALID The specified short name is invalid.
+SHORT_NAME_OCCUPIED The specified short name is already in use.
+SLOTS_EMPTY The specified slot list is empty.
+SLOWMODE_MULTI_MSGS_DISABLED Slowmode is enabled, you cannot forward multiple messages to this group.
+SLOWMODE_WAIT_X Slowmode is enabled in this chat: wait {value} seconds before sending another message to this chat.
+SLUG_INVALID The specified invoice slug is invalid.
+SMS_CODE_CREATE_FAILED An error occurred while creating the SMS code.
+SRP_ID_INVALID Invalid SRP ID provided.
+SRP_PASSWORD_CHANGED Password has changed.
+START_PARAM_EMPTY The start parameter is empty.
+START_PARAM_INVALID Start parameter invalid.
+START_PARAM_TOO_LONG Start parameter is too long.
+STICKERPACK_STICKERS_TOO_MUCH There are too many stickers in this stickerpack, you can't add any more.
+STICKERSET_INVALID The provided sticker set is invalid.
STICKERSET_NOT_MODIFIED The sticker set is not modified
-STICKERS_EMPTY The sticker provided is empty
-STICKERS_TOO_MUCH Too many stickers in the set
-STICKER_DOCUMENT_INVALID The sticker document is invalid
-STICKER_EMOJI_INVALID The sticker emoji is invalid
-STICKER_FILE_INVALID The sticker file is invalid
-STICKER_GIF_DIMENSIONS The specified video sticker has invalid dimensions
-STICKER_ID_INVALID The provided sticker id is invalid
-STICKER_INVALID The provided sticker is invalid
-STICKER_MIME_INVALID Make sure to pass a valid image file for the right InputFile parameter
-STICKER_PNG_DIMENSIONS The sticker png dimensions are invalid
-STICKER_PNG_NOPNG Stickers must be png files but the provided image was not a png
-STICKER_TGS_NODOC You must send the animated sticker as a document
-STICKER_TGS_NOTGS A tgs sticker file was expected, but something else was provided
-STICKER_THUMB_PNG_NOPNG A png sticker thumbnail file was expected, but something else was provided
-STICKER_VIDEO_BIG The specified video sticker is too big
-STICKER_VIDEO_NODOC You must send the video sticker as a document
-STICKER_VIDEO_NOWEBM A webm video file was expected, but something else was provided
-STORIES_TOO_MUCH Too many stories in the current account
-STORY_PERIOD_INVALID The story period is invalid
-SWITCH_PM_TEXT_EMPTY The switch_pm.text field was empty
-TAKEOUT_INVALID The takeout id is invalid
-TAKEOUT_REQUIRED The method must be invoked inside a takeout session
-TEMP_AUTH_KEY_ALREADY_BOUND The passed temporary key is already bound to another perm_auth_key_id
-TEMP_AUTH_KEY_EMPTY The temporary auth key provided is empty
-THEME_FILE_INVALID Invalid theme file provided
-THEME_FORMAT_INVALID Invalid theme format provided
-THEME_INVALID Invalid theme provided
-THEME_MIME_INVALID You cannot create this theme because the mime-type is invalid
-THEME_TITLE_INVALID The specified theme title is invalid
-TITLE_INVALID The specified stickerpack title is invalid
-TMP_PASSWORD_DISABLED The temporary password is disabled
+STICKERS_EMPTY No sticker provided.
+STICKERS_TOO_MUCH There are too many stickers in this stickerpack, you can't add any more.
+STICKER_DOCUMENT_INVALID The specified sticker document is invalid.
+STICKER_EMOJI_INVALID Sticker emoji invalid.
+STICKER_FILE_INVALID Sticker file invalid.
+STICKER_GIF_DIMENSIONS The specified video sticker has invalid dimensions.
+STICKER_ID_INVALID The provided sticker ID is invalid.
+STICKER_INVALID The provided sticker is invalid.
+STICKER_MIME_INVALID The specified sticker MIME type is invalid.
+STICKER_PNG_DIMENSIONS Sticker png dimensions invalid.
+STICKER_PNG_NOPNG One of the specified stickers is not a valid PNG file.
+STICKER_TGS_NODOC You must send the animated sticker as a document.
+STICKER_TGS_NOTGS Invalid TGS sticker provided.
+STICKER_THUMB_PNG_NOPNG Incorrect stickerset thumb file provided, PNG / WEBP expected.
+STICKER_THUMB_TGS_NOTGS Incorrect stickerset TGS thumb file provided.
+STICKER_VIDEO_BIG The specified video sticker is too big.
+STICKER_VIDEO_NODOC You must send the video sticker as a document.
+STICKER_VIDEO_NOWEBM The specified video sticker is not in webm format.
+STORIES_NEVER_CREATED This peer hasn't ever posted any stories.
+STORIES_TOO_MUCH You have hit the maximum active stories limit as specified by the [`story_expiring_limit_*` client configuration parameters](https://core.telegram.org/api/config#story-expiring-limit-default): you should buy a [Premium](/api/premium) subscription, delete an active story, or wait for the oldest story to expire.
+STORY_ID_EMPTY You specified no story IDs.
+STORY_ID_INVALID The specified story ID is invalid.
+STORY_NOT_MODIFIED The new story information you passed is equal to the previous story information, thus it wasn't modified.
+STORY_PERIOD_INVALID The specified story period is invalid for this account.
+STORY_SEND_FLOOD_MONTHLY_X You've hit the monthly story limit as specified by the [`stories_sent_monthly_limit_*` client configuration parameters](https://core.telegram.org/api/config#stories-sent-monthly-limit-default): wait for the specified number of seconds before posting a new story.
+STORY_SEND_FLOOD_WEEKLY_X You've hit the weekly story limit as specified by the [`stories_sent_weekly_limit_*` client configuration parameters](https://core.telegram.org/api/config#stories-sent-weekly-limit-default): wait for the specified number of seconds before posting a new story.
+SWITCH_PM_TEXT_EMPTY The switch_pm.text field was empty.
+TAKEOUT_INIT_DELAY_X Sorry, for security reasons, you will be able to begin downloading your data in {value} seconds. We have notified all your devices about the export request to make sure it's authorized and to give you time to react if it's not.
+TAKEOUT_INVALID The specified takeout ID is invalid.
+TAKEOUT_REQUIRED A [takeout](https://core.telegram.org/api/takeout) session needs to be initialized first, [see here » for more info](/api/takeout).
+TASK_ALREADY_EXISTS An email reset was already requested.
+TEMP_AUTH_KEY_ALREADY_BOUND The passed temporary key is already bound to another **perm_auth_key_id**.
+TEMP_AUTH_KEY_EMPTY No temporary auth key provided.
+THEME_FILE_INVALID Invalid theme file provided.
+THEME_FORMAT_INVALID Invalid theme format provided.
+THEME_INVALID Invalid theme provided.
+THEME_MIME_INVALID The theme's MIME type is invalid.
+THEME_TITLE_INVALID The specified theme title is invalid.
+TITLE_INVALID The specified stickerpack title is invalid.
+TMP_PASSWORD_DISABLED The temporary password is disabled.
TMP_PASSWORD_INVALID The temporary password is invalid
-TOKEN_INVALID The provided token is invalid
-TOPIC_NOT_MODIFIED The topic was not modified
-TO_LANG_INVALID The specified destination language is invalid
-TRANSCRIPTION_FAILED Telegram is having internal problems. Please try again later to transcribe the audio.
-TTL_DAYS_INVALID The provided TTL days is invalid
-TTL_MEDIA_INVALID The media does not support self-destruction
-TYPES_EMPTY The types parameter is empty
+TOKEN_EMPTY The specified token is empty.
+TOKEN_INVALID The provided token is invalid.
+TOKEN_TYPE_INVALID The specified token type is invalid.
+TOPICS_EMPTY You specified no topic IDs.
+TOPIC_CLOSED This topic was closed, you can't send messages to it anymore.
+TOPIC_CLOSE_SEPARATELY The `close` flag cannot be provided together with any of the other flags.
+TOPIC_DELETED The specified topic was deleted.
+TOPIC_HIDE_SEPARATELY The `hide` flag cannot be provided together with any of the other flags.
+TOPIC_ID_INVALID The specified topic ID is invalid.
+TOPIC_NOT_MODIFIED The updated topic info is equal to the current topic info, nothing was changed.
+TOPIC_TITLE_EMPTY The specified topic title is empty.
+TO_LANG_INVALID The specified destination language is invalid.
+TRANSCRIPTION_FAILED Audio transcription failed.
+TTL_DAYS_INVALID The provided TTL is invalid.
+TTL_MEDIA_INVALID Invalid media Time To Live was provided.
+TTL_PERIOD_INVALID The specified TTL period is invalid.
+TYPES_EMPTY No top peer type was provided.
TYPE_CONSTRUCTOR_INVALID The type constructor is invalid
-UNKNOWN_ERROR Unknown error
-UNTIL_DATE_INVALID That date parameter is invalid
-URL_INVALID The URL provided is invalid
-USAGE_LIMIT_INVALID The usage limit is invalid
-USERNAME_INVALID The username is invalid
-USERNAME_NOT_MODIFIED The username was not modified because you tried to edit it using the same one
-USERNAME_NOT_OCCUPIED The username is not occupied by anyone
-USERNAME_OCCUPIED The username is already in use by someone else
-USERNAME_PURCHASE_AVAILABLE The username is available for purchase on fragment.com
-USERPIC_UPLOAD_REQUIRED You are required to upload a profile picture for this action
-USERS_TOO_FEW Not enough users (to create a chat, for example)
-USERS_TOO_MUCH The maximum number of users has been exceeded (to create a chat, for example)
-USER_ADMIN_INVALID The action requires admin privileges. Probably you tried to edit admin privileges on someone you don't have rights to
-USER_ALREADY_INVITED You have already invited this user
-USER_ALREADY_PARTICIPANT The user is already a participant of this chat
-USER_BANNED_IN_CHANNEL You are limited from sending messages in supergroups/channels, check @SpamBot for details
-USER_BLOCKED The user is blocked
-USER_BOT Bots in channels can only be administrators, not members.
-USER_BOT_INVALID This method can only be used by a bot
-USER_BOT_REQUIRED The method can be used by bots only
-USER_CHANNELS_TOO_MUCH The user is already in too many channels or supergroups
-USER_CREATOR You can't leave this channel because you're its creator
-USER_ID_INVALID The user id being used is invalid or not known yet. Make sure you meet the user before interacting with it
-USER_INVALID The provided user is invalid
-USER_IS_BLOCKED The user blocked you
-USER_IS_BOT A bot cannot send messages to other bots or to itself
-USER_KICKED This user was kicked from this chat
-USER_NOT_MUTUAL_CONTACT The user is not a mutual contact
-USER_NOT_PARTICIPANT The user is not a member of this chat
-USER_PUBLIC_MISSING The accounts username is missing
-USER_VOLUME_INVALID The specified user volume is invalid
-VIDEO_CONTENT_TYPE_INVALID The video content type is invalid (i.e.: not streamable)
-VIDEO_FILE_INVALID The video file is invalid
-VIDEO_TITLE_EMPTY The specified video title is empty
-VOICE_MESSAGES_FORBIDDEN Voice messages are restricted
+UNTIL_DATE_INVALID Invalid until date provided.
+URL_INVALID Invalid URL provided.
+USAGE_LIMIT_INVALID The specified usage limit is invalid.
+USERNAMES_ACTIVE_TOO_MUCH The maximum number of active usernames was reached.
+USERNAME_INVALID The provided username is not valid.
+USERNAME_NOT_MODIFIED The username was not modified.
+USERNAME_NOT_OCCUPIED The provided username is not occupied.
+USERNAME_OCCUPIED The provided username is already occupied.
+USERNAME_PURCHASE_AVAILABLE The specified username can be purchased on https://fragment.com.
+USERPIC_UPLOAD_REQUIRED You must have a profile picture to publish your geolocation.
+USERS_TOO_FEW Not enough users (to create a chat, for example).
+USERS_TOO_MUCH The maximum number of users has been exceeded (to create a chat, for example).
+USER_ADMIN_INVALID You're not an admin.
+USER_ALREADY_INVITED You have already invited this user.
+USER_ALREADY_PARTICIPANT The user is already in the group.
+USER_BANNED_IN_CHANNEL You're banned from sending messages in supergroups/channels.
+USER_BLOCKED User blocked.
+USER_BOT Bots can only be admins in channels.
+USER_BOT_INVALID User accounts must provide the `bot` method parameter when calling this method. If there is no such method parameter, this method can only be invoked by bot accounts.
+USER_BOT_REQUIRED This method can only be called by a bot.
+USER_CHANNELS_TOO_MUCH One of the users you tried to add is already in too many channels/supergroups.
+USER_CREATOR You can't leave this channel, because you're its creator.
+USER_ID_INVALID The provided user ID is invalid.
+USER_INVALID Invalid user provided.
+USER_IS_BLOCKED You were blocked by this user.
+USER_IS_BOT Bots can't send messages to other bots.
+USER_KICKED This user was kicked from this supergroup/channel.
+USER_NOT_MUTUAL_CONTACT The provided user is not a mutual contact.
+USER_NOT_PARTICIPANT You're not a member of this supergroup/channel.
+USER_PUBLIC_MISSING Cannot generate a link to stories posted by a peer without a username.
+USER_VOLUME_INVALID The specified user volume is invalid.
+VENUE_ID_INVALID The specified venue ID is invalid.
+VIDEO_CONTENT_TYPE_INVALID The video's content type is invalid.
+VIDEO_FILE_INVALID The specified video file is invalid.
+VIDEO_TITLE_EMPTY The specified video title is empty.
+VOICE_MESSAGES_FORBIDDEN This user's privacy settings forbid you from sending voice messages.
VOLUME_LOC_NOT_FOUND The volume location can't be found
-WALLPAPER_FILE_INVALID The provided file cannot be used as a wallpaper
-WALLPAPER_INVALID The input wallpaper was not valid
-WALLPAPER_MIME_INVALID The wallpaper mime type is invalid
-WC_CONVERT_URL_INVALID WC convert URL invalid
-WEBDOCUMENT_INVALID The web document is invalid
-WEBDOCUMENT_MIME_INVALID The web document mime type is invalid
-WEBDOCUMENT_SIZE_TOO_BIG The web document is too big
+WALLPAPER_FILE_INVALID The specified wallpaper file is invalid.
+WALLPAPER_INVALID The specified wallpaper is invalid.
+WALLPAPER_MIME_INVALID The specified wallpaper MIME type is invalid.
+WALLPAPER_NOT_FOUND The specified wallpaper could not be found.
+WC_CONVERT_URL_INVALID WC convert URL invalid.
+WEBDOCUMENT_INVALID Invalid webdocument URL provided.
+WEBDOCUMENT_MIME_INVALID Invalid webdocument mime type provided.
+WEBDOCUMENT_SIZE_TOO_BIG Webdocument is too big!
WEBDOCUMENT_URL_EMPTY The web document URL is empty
-WEBDOCUMENT_URL_INVALID The web document URL is invalid
-WEBPAGE_CURL_FAILED Telegram server could not fetch the provided URL
-WEBPAGE_MEDIA_EMPTY The URL doesn't contain any valid media
-TOPIC_DELETED The specified topic was deleted
-TOPIC_CLOSED This topic was closed, you can't send messages to it anymore
-STORIES_NEVER_CREATED You have never created any stories
-STORIES_TOO_MUCH Too many stories posted by the user
-GROUPCALL_FORBIDDEN The group call has already ended.
-WEBPAGE_NOT_FOUND Webpage not found
-WEBPAGE_URL_INVALID Webpage url invalid
-WEBPUSH_AUTH_INVALID The specified web push authentication secret is invalid
-WEBPUSH_KEY_INVALID The specified web push elliptic curve Diffie-Hellman public key is invalid
-WEBPUSH_TOKEN_INVALID The specified web push token is invalid
-YOU_BLOCKED_USER You blocked this user
+WEBDOCUMENT_URL_INVALID The specified webdocument URL is invalid.
+WEBPAGE_CURL_FAILED Failure while fetching the webpage with cURL.
+WEBPAGE_MEDIA_EMPTY Webpage media empty.
+WEBPAGE_NOT_FOUND A preview for the specified webpage `url` could not be generated.
+WEBPAGE_URL_INVALID The specified webpage `url` is invalid.
+WEBPUSH_AUTH_INVALID The specified web push authentication secret is invalid.
+WEBPUSH_KEY_INVALID The specified web push elliptic curve Diffie-Hellman public key is invalid.
+WEBPUSH_TOKEN_INVALID The specified web push token is invalid.
+YOU_BLOCKED_USER You blocked this user.
\ No newline at end of file
diff --git a/compiler/errors/source/403_FORBIDDEN.tsv b/compiler/errors/source/403_FORBIDDEN.tsv
index c45d9ede..75e22082 100644
--- a/compiler/errors/source/403_FORBIDDEN.tsv
+++ b/compiler/errors/source/403_FORBIDDEN.tsv
@@ -1,44 +1,508 @@
id message
-BROADCAST_FORBIDDEN The request can't be used in channels
-CHANNEL_PUBLIC_GROUP_NA The channel/supergroup is not available
-CHAT_ADMIN_INVITE_REQUIRED You don't have rights to invite other users
-CHAT_ADMIN_REQUIRED The method requires chat admin privileges
+2FA_CONFIRM_WAIT_X Since this account is active and protected by a 2FA password, we will delete it in 1 week for security purposes. You can cancel this process at any time, you'll be able to reset your account in {value} seconds.
+ABOUT_TOO_LONG About string too long.
+ACCESS_TOKEN_EXPIRED Access token expired.
+ACCESS_TOKEN_INVALID Access token invalid.
+ADDRESS_INVALID The specified geopoint address is invalid.
+ADMINS_TOO_MUCH There are too many admins.
+ADMIN_ID_INVALID The specified admin ID is invalid.
+ADMIN_RANK_EMOJI_NOT_ALLOWED An admin rank cannot contain emojis.
+ADMIN_RANK_INVALID The specified admin rank is invalid.
+ADMIN_RIGHTS_EMPTY The chatAdminRights constructor passed in keyboardButtonRequestPeer.peer_type.user_admin_rights has no rights set (i.e. flags is 0).
+ALBUM_PHOTOS_TOO_MANY You have uploaded too many profile photos, delete some before retrying.
+ANONYMOUS_REACTIONS_DISABLED Sorry, anonymous administrators cannot leave reactions or participate in polls.
+API_ID_INVALID API ID invalid.
+API_ID_PUBLISHED_FLOOD This API id was published somewhere, you can't use it now.
+ARTICLE_TITLE_EMPTY The title of the article is empty.
+AUDIO_CONTENT_URL_EMPTY The remote URL specified in the content field is empty.
+AUDIO_TITLE_EMPTY An empty audio title was provided.
+AUTH_BYTES_INVALID The provided authorization is invalid.
+AUTH_TOKEN_ALREADY_ACCEPTED The specified auth token was already accepted.
+AUTH_TOKEN_EXCEPTION An error occurred while importing the auth token.
+AUTH_TOKEN_EXPIRED The authorization token has expired.
+AUTH_TOKEN_INVALID The specified auth token is invalid.
+AUTH_TOKEN_INVALIDX The specified auth token is invalid.
+AUTOARCHIVE_NOT_AVAILABLE The autoarchive setting is not available at this time: please check the value of the [autoarchive_setting_available field in client config »](https://core.telegram.org/api/config#client-configuration) before calling this method.
+BANK_CARD_NUMBER_INVALID The specified card number is invalid.
+BANNED_RIGHTS_INVALID You provided some invalid flags in the banned rights.
+BOOSTS_EMPTY No boost slots were specified.
+BOOSTS_REQUIRED The specified channel must first be [boosted by its users](https://core.telegram.org/api/boost) in order to perform this action.
+BOOST_NOT_MODIFIED You're already [boosting](https://core.telegram.org/api/boost) the specified channel.
+BOOST_PEER_INVALID The specified `boost_peer` is invalid.
+BOTS_TOO_MUCH There are too many bots in this chat/channel.
+BOT_APP_INVALID The specified bot app is invalid.
+BOT_APP_SHORTNAME_INVALID The specified bot app short name is invalid.
+BOT_CHANNELS_NA Bots can't edit admin privileges.
+BOT_COMMAND_DESCRIPTION_INVALID The specified command description is invalid.
+BOT_COMMAND_INVALID The specified command is invalid.
+BOT_DOMAIN_INVALID Bot domain invalid.
+BOT_GROUPS_BLOCKED This bot can't be added to groups.
+BOT_INLINE_DISABLED This bot can't be used in inline mode.
+BOT_INVALID This is not a valid bot.
+BOT_MISSING Only bots can call this method, please use [@stickers](https://t.me/stickers) if you're a user.
+BOT_ONESIDE_NOT_AVAIL Bots can't pin messages in PM just for themselves.
+BOT_PAYMENTS_DISABLED Please enable bot payments in botfather before calling this method.
+BOT_RESPONSE_TIMEOUT A timeout occurred while fetching data from the bot.
+BOT_SCORE_NOT_MODIFIED The score wasn't modified.
+BOT_WEBVIEW_DISABLED A webview cannot be opened in the specified conditions: emitted for example if `from_bot_menu` or `url` are set and `peer` is not the chat with the bot.
+BROADCAST_FORBIDDEN Channel poll voters and reactions cannot be fetched to prevent deanonymization.
+BROADCAST_ID_INVALID Broadcast ID invalid.
+BROADCAST_PUBLIC_VOTERS_FORBIDDEN You can't forward polls with public voters.
+BROADCAST_REQUIRED This method can only be called on a channel, please use stats.getMegagroupStats for supergroups.
+BUTTON_DATA_INVALID The data of one or more of the buttons you provided is invalid.
+BUTTON_TEXT_INVALID The specified button text is invalid.
+BUTTON_TYPE_INVALID The type of one or more of the buttons you provided is invalid.
+BUTTON_URL_INVALID Button URL invalid.
+BUTTON_USER_PRIVACY_RESTRICTED The privacy setting of the user specified in a [inputKeyboardButtonUserProfile](/constructor/inputKeyboardButtonUserProfile) button do not allow creating such a button.
+CALL_ALREADY_ACCEPTED The call was already accepted.
+CALL_ALREADY_DECLINED The call was already declined.
+CALL_OCCUPY_FAILED The call failed because the user is already making another call.
+CALL_PEER_INVALID The provided call peer object is invalid.
+CALL_PROTOCOL_FLAGS_INVALID Call protocol flags invalid.
+CDN_METHOD_INVALID You can't call this method in a CDN DC.
+CHANNELS_ADMIN_LOCATED_TOO_MUCH The user has reached the limit of public geogroups.
+CHANNELS_ADMIN_PUBLIC_TOO_MUCH You're admin of too many public channels, make some channels private to change the username of this channel.
+CHANNELS_TOO_MUCH You have joined too many channels/supergroups.
+CHANNEL_FORUM_MISSING This supergroup is not a forum.
+CHANNEL_ID_INVALID The specified supergroup ID is invalid.
+CHANNEL_INVALID The provided channel is invalid.
+CHANNEL_PARICIPANT_MISSING The current user is not in the channel.
+CHANNEL_PRIVATE You haven't joined this channel/supergroup.
+CHANNEL_PUBLIC_GROUP_NA channel/supergroup not available.
+CHANNEL_TOO_BIG This channel has too many participants (>1000) to be deleted.
+CHANNEL_TOO_LARGE Channel is too large to be deleted; this error is issued when trying to delete channels with more than 1000 members (subject to change).
+CHATLIST_EXCLUDE_INVALID The specified `exclude_peers` are invalid.
+CHAT_ABOUT_NOT_MODIFIED About text has not changed.
+CHAT_ABOUT_TOO_LONG Chat about too long.
+CHAT_ADMIN_INVITE_REQUIRED You do not have the rights to do this.
+CHAT_ADMIN_REQUIRED You must be an admin in this chat to do this.
+CHAT_DISCUSSION_UNALLOWED You can't enable forum topics in a discussion group linked to a channel.
CHAT_FORBIDDEN You cannot write in this chat
-CHAT_SEND_AUDIOS_FORBIDDEN You cannot send audio messages in this chat
-CHAT_SEND_DOCS_FORBIDDEN You cannot send document messages in this chat
-CHAT_SEND_GIFS_FORBIDDEN You can't send animations in this chat
-CHAT_SEND_INLINE_FORBIDDEN You cannot use inline bots to send messages in this chat
-CHAT_SEND_MEDIA_FORBIDDEN You cannot send media messages in this chat
-CHAT_SEND_PHOTOS_FORBIDDEN You cannot send photos in this chat
-CHAT_SEND_PLAIN_FORBIDDEN You cannot send text messages in this chat
-CHAT_SEND_POLL_FORBIDDEN You cannot send polls in this chat
+CHAT_FORWARDS_RESTRICTED You can't forward messages from a protected chat.
+CHAT_GUEST_SEND_FORBIDDEN You join the discussion group before commenting, see [here »](/api/discussion#requiring-users-to-join-the-group) for more info.
+CHAT_ID_EMPTY The provided chat ID is empty.
+CHAT_ID_INVALID The provided chat id is invalid.
+CHAT_INVALID Invalid chat.
+CHAT_INVITE_PERMANENT You can't set an expiration date on permanent invite links.
+CHAT_LINK_EXISTS The chat is public, you can't hide the history to new users.
+CHAT_NOT_MODIFIED No changes were made to chat information because the new information you passed is identical to the current information.
+CHAT_PUBLIC_REQUIRED You can only enable join requests in public groups.
+CHAT_RESTRICTED You can't send messages in this chat, you were restricted.
+CHAT_REVOKE_DATE_UNSUPPORTED `min_date` and `max_date` are not available for using with non-user peers.
+CHAT_SEND_AUDIOS_FORBIDDEN You can't send audio messages in this chat.
+CHAT_SEND_DOCS_FORBIDDEN You can't send documents in this chat.
+CHAT_SEND_GAME_FORBIDDEN You can't send a game to this chat.
+CHAT_SEND_GIFS_FORBIDDEN You can't send gifs in this chat.
+CHAT_SEND_INLINE_FORBIDDEN You can't send inline messages in this group.
+CHAT_SEND_MEDIA_FORBIDDEN You can't send media in this chat.
+CHAT_SEND_PHOTOS_FORBIDDEN You can't send photos in this chat.
+CHAT_SEND_PLAIN_FORBIDDEN You can't send non-media (text) messages in this chat.
+CHAT_SEND_POLL_FORBIDDEN You can't send polls in this chat.
CHAT_SEND_ROUNDVIDEOS_FORBIDDEN You cannot send video notes in this chat
-CHAT_SEND_STICKERS_FORBIDDEN You can't send stickers in this chat
-CHAT_SEND_VIDEOS_FORBIDDEN You cannot send videos in this chat
-CHAT_WRITE_FORBIDDEN You don't have rights to send messages in this chat
-EDIT_BOT_INVITE_FORBIDDEN Bots' chat invite links can't be edited
-GROUPCALL_ALREADY_STARTED The groupcall has already started, you can join directly using phone.joinGroupCall
-GROUPCALL_FORBIDDEN The group call has already ended
-INLINE_BOT_REQUIRED The action must be performed through an inline bot callback
-MESSAGE_AUTHOR_REQUIRED You are not the author of this message
-MESSAGE_DELETE_FORBIDDEN You don't have rights to delete messages in this chat, most likely because you are not the author of them
-NOT_ALLOWED Not allowed
-PARTICIPANT_JOIN_MISSING Trying to enable a presentation, when the user hasn't joined the Video Chat with phone.joinGroupCall
-POLL_VOTE_REQUIRED Cast a vote in the poll before calling this method
-PREMIUM_ACCOUNT_REQUIRED This action requires a premium account
-PRIVACY_PREMIUM_REQUIRED The user has restricted from sending messages or this action requires a premium account
-PUBLIC_CHANNEL_MISSING You can only export group call invite links for public chats or channels
-RIGHT_FORBIDDEN You don't have enough rights for this action, or you tried to set one or more admin rights that can't be applied to this kind of chat (channel or supergroup)
-SENSITIVE_CHANGE_FORBIDDEN Your sensitive content settings can't be changed at this time
-TAKEOUT_REQUIRED The method must be invoked inside a takeout session
-USER_BOT_INVALID This method can only be called by a bot
-USER_CHANNELS_TOO_MUCH One of the users you tried to add is already in too many channels/supergroups
-USER_DELETED You can't send this secret message because the other participant deleted their account
-USER_INVALID The provided user is invalid
-USER_IS_BLOCKED The user is blocked
-USER_NOT_MUTUAL_CONTACT The provided user is not a mutual contact
-USER_PRIVACY_RESTRICTED The user's privacy settings is preventing you to perform this action
-USER_RESTRICTED You are limited/restricted. You can't perform this action
-CHAT_SEND_GAME_FORBIDDEN You can't send a game to this chat
-CHAT_SEND_VOICES_FORBIDDEN You can't send voice recordings in this chat
-LIVE_DISABLED Story is disabled server-side
+CHAT_SEND_STICKERS_FORBIDDEN You can't send stickers in this chat.
+CHAT_SEND_VIDEOS_FORBIDDEN You can't send videos in this chat.
+CHAT_SEND_VOICES_FORBIDDEN You can't send voice recordings in this chat.
+CHAT_TITLE_EMPTY No chat title provided.
+CHAT_TOO_BIG This method is not available for groups with more than `chat_read_mark_size_threshold` members, [see client configuration »](https://core.telegram.org/api/config#client-configuration).
+CHAT_WRITE_FORBIDDEN You can't write in this chat.
+CODE_EMPTY The provided code is empty.
+CODE_HASH_INVALID Code hash invalid.
+CODE_INVALID Code invalid.
+COLOR_INVALID The specified color palette ID was invalid.
+CONNECTION_API_ID_INVALID The provided API id is invalid.
+CONNECTION_APP_VERSION_EMPTY App version is empty.
+CONNECTION_LAYER_INVALID Layer invalid.
+CONTACT_ADD_MISSING Contact to add is missing.
+CONTACT_ID_INVALID The provided contact ID is invalid.
+CONTACT_MISSING The specified user is not a contact.
+CONTACT_NAME_EMPTY Contact name empty.
+CONTACT_REQ_MISSING Missing contact request.
+CREATE_CALL_FAILED An error occurred while creating the call.
+CURRENCY_TOTAL_AMOUNT_INVALID The total amount of all prices is invalid.
+CUSTOM_REACTIONS_TOO_MANY Too many custom reactions were specified.
+DATA_INVALID Encrypted data invalid.
+DATA_JSON_INVALID The provided JSON data is invalid.
+DATA_TOO_LONG Data too long.
+DATE_EMPTY Date empty.
+DC_ID_INVALID The provided DC ID is invalid.
+DH_G_A_INVALID g_a invalid.
+DOCUMENT_INVALID The specified document is invalid.
+EDIT_BOT_INVITE_FORBIDDEN Normal users can't edit invites that were created by bots.
+EMAIL_HASH_EXPIRED Email hash expired.
+EMAIL_INVALID The specified email is invalid.
+EMAIL_NOT_SETUP In order to change the login email with emailVerifyPurposeLoginChange, an existing login email must already be set using emailVerifyPurposeLoginSetup.
+EMAIL_UNCONFIRMED Email unconfirmed.
+EMAIL_UNCONFIRMED_X The provided email isn't confirmed, {value} is the length of the verification code that was just sent to the email: use [account.verifyEmail](https://core.telegram.org/method/account.verifyEmail) to enter the received verification code and enable the recovery email.
+EMAIL_VERIFY_EXPIRED The verification email has expired.
+EMOJI_INVALID The specified theme emoji is valid.
+EMOJI_MARKUP_INVALID The specified `video_emoji_markup` was invalid.
+EMOJI_NOT_MODIFIED The theme wasn't changed.
+EMOTICON_EMPTY The emoji is empty.
+EMOTICON_INVALID The specified emoji is invalid.
+EMOTICON_STICKERPACK_MISSING inputStickerSetDice.emoji cannot be empty.
+ENCRYPTED_MESSAGE_INVALID Encrypted message invalid.
+ENCRYPTION_ALREADY_ACCEPTED Secret chat already accepted.
+ENCRYPTION_ALREADY_DECLINED The secret chat was already declined.
+ENCRYPTION_DECLINED The secret chat was declined.
+ENCRYPTION_ID_INVALID The provided secret chat ID is invalid.
+ENTITIES_TOO_LONG You provided too many styled message entities.
+ENTITY_BOUNDS_INVALID A specified [entity offset or length](/api/entities#entity-length) is invalid, see [here »](/api/entities#entity-length) for info on how to properly compute the entity offset/length.
+ENTITY_MENTION_USER_INVALID You mentioned an invalid user.
+ERROR_TEXT_EMPTY The provided error message is empty.
+EXPIRE_DATE_INVALID The specified expiration date is invalid.
+EXPORT_CARD_INVALID Provided card is invalid.
+EXTERNAL_URL_INVALID External URL invalid.
+FILE_CONTENT_TYPE_INVALID File content-type is invalid.
+FILE_EMTPY An empty file was provided.
+FILE_ID_INVALID The provided file id is invalid.
+FILE_PARTS_INVALID The number of file parts is invalid.
+FILE_PART_EMPTY The provided file part is empty.
+FILE_PART_INVALID The file part number is invalid.
+FILE_PART_LENGTH_INVALID The length of a file part is invalid.
+FILE_PART_SIZE_CHANGED Provided file part size has changed.
+FILE_PART_SIZE_INVALID The provided file part size is invalid.
+FILE_PART_TOO_BIG The uploaded file part is too big.
+FILE_REFERENCE_EMPTY An empty [file reference](https://core.telegram.org/api/file_reference) was specified.
+FILE_REFERENCE_EXPIRED File reference expired, it must be refetched as described in [the documentation](https://core.telegram.org/api/file_reference).
+FILE_REFERENCE_INVALID The specified [file reference](https://core.telegram.org/api/file_reference) is invalid.
+FILE_TITLE_EMPTY An empty file title was specified.
+FILE_TOKEN_INVALID The specified file token is invalid.
+FILTER_ID_INVALID The specified filter ID is invalid.
+FILTER_INCLUDE_EMPTY The include_peers vector of the filter is empty.
+FILTER_NOT_SUPPORTED The specified filter cannot be used in this context.
+FILTER_TITLE_EMPTY The title field of the filter is empty.
+FIRSTNAME_INVALID The first name is invalid.
+FOLDER_ID_EMPTY An empty folder ID was specified.
+FOLDER_ID_INVALID Invalid folder ID.
+FORUM_ENABLED You can't execute the specified action because the group is a [forum](https://core.telegram.org/api/forum), disable forum functionality to continue.
+FRESH_CHANGE_ADMINS_FORBIDDEN You were just elected admin, you can't add or modify other admins yet.
+FROM_MESSAGE_BOT_DISABLED Bots can't use fromMessage min constructors.
+FROM_PEER_INVALID The specified from_id is invalid.
+GAME_BOT_INVALID Bots can't send another bot's game.
+GENERAL_MODIFY_ICON_FORBIDDEN You can't modify the icon of the "General" topic.
+GEO_POINT_INVALID Invalid geoposition provided.
+GIFT_SLUG_EXPIRED The specified gift slug has expired.
+GIFT_SLUG_INVALID The specified slug is invalid.
+GIF_CONTENT_TYPE_INVALID GIF content-type invalid.
+GIF_ID_INVALID The provided GIF ID is invalid.
+GRAPH_EXPIRED_RELOAD This graph has expired, please obtain a new graph token.
+GRAPH_INVALID_RELOAD Invalid graph token provided, please reload the stats and provide the updated token.
+GRAPH_OUTDATED_RELOAD The graph is outdated, please get a new async token using stats.getBroadcastStats.
+GROUPCALL_ALREADY_DISCARDED The group call was already discarded.
+GROUPCALL_ALREADY_STARTED The groupcall has already started, you can join directly using [phone.joinGroupCall](https://core.telegram.org/method/phone.joinGroupCall).
+GROUPCALL_FORBIDDEN The group call has already ended.
+GROUPCALL_INVALID The specified group call is invalid.
+GROUPCALL_JOIN_MISSING You haven't joined this group call.
+GROUPCALL_NOT_MODIFIED Group call settings weren't modified.
+GROUPCALL_SSRC_DUPLICATE_MUCH The app needs to retry joining the group call with a new SSRC value.
+GROUPED_MEDIA_INVALID Invalid grouped media.
+HASH_INVALID The provided hash is invalid.
+HIDE_REQUESTER_MISSING The join request was missing or was already handled.
+IMAGE_PROCESS_FAILED Failure while processing image.
+IMPORT_FILE_INVALID The specified chat export file is invalid.
+IMPORT_FORMAT_UNRECOGNIZED The specified chat export file was exported from an unsupported chat app.
+IMPORT_ID_INVALID The specified import ID is invalid.
+IMPORT_TOKEN_INVALID The specified token is invalid.
+INLINE_BOT_REQUIRED Only the inline bot can edit message.
+INLINE_RESULT_EXPIRED The inline query expired.
+INPUT_CHATLIST_INVALID The specified folder is invalid.
+INPUT_FILTER_INVALID The specified filter is invalid.
+INPUT_TEXT_EMPTY The specified text is empty.
+INPUT_TEXT_TOO_LONG The specified text is too long.
+INPUT_USER_DEACTIVATED The specified user was deleted.
+INVITES_TOO_MUCH The maximum number of per-folder invites specified by the `chatlist_invites_limit_default`/`chatlist_invites_limit_premium` [client configuration parameters »](/api/config#chatlist-invites-limit-default) was reached.
+INVITE_FORBIDDEN_WITH_JOINAS If the user has anonymously joined a group call as a channel, they can't invite other users to the group call because that would cause deanonymization, because the invite would be sent using the original user ID, not the anonymized channel ID.
+INVITE_HASH_EMPTY The invite hash is empty.
+INVITE_HASH_EXPIRED The invite link has expired.
+INVITE_HASH_INVALID The invite hash is invalid.
+INVITE_REQUEST_SENT You have successfully requested to join this chat or channel.
+INVITE_REVOKED_MISSING The specified invite link was already revoked or is invalid.
+INVITE_SLUG_EMPTY The specified invite slug is empty.
+INVITE_SLUG_EXPIRED The specified chat folder link has expired.
+INVOICE_PAYLOAD_INVALID The specified invoice payload is invalid.
+JOIN_AS_PEER_INVALID The specified peer cannot be used to join a group call.
+LANG_CODE_INVALID The specified language code is invalid.
+LANG_CODE_NOT_SUPPORTED The specified language code is not supported.
+LANG_PACK_INVALID The provided language pack is invalid.
+LASTNAME_INVALID The last name is invalid.
+LIMIT_INVALID The provided limit is invalid.
+LINK_NOT_MODIFIED Discussion link not modified.
+LOCATION_INVALID The provided location is invalid.
+MAX_DATE_INVALID The specified maximum date is invalid.
+MAX_ID_INVALID The provided max ID is invalid.
+MAX_QTS_INVALID The specified max_qts is invalid.
+MD5_CHECKSUM_INVALID The MD5 checksums do not match.
+MEDIA_CAPTION_TOO_LONG The caption is too long.
+MEDIA_EMPTY The provided media object is invalid.
+MEDIA_FILE_INVALID The specified media file is invalid.
+MEDIA_GROUPED_INVALID You tried to send media of different types in an album.
+MEDIA_INVALID Media invalid.
+MEDIA_NEW_INVALID The new media is invalid.
+MEDIA_PREV_INVALID Previous media invalid.
+MEDIA_TTL_INVALID The specified media TTL is invalid.
+MEDIA_TYPE_INVALID The specified media type cannot be used in stories.
+MEDIA_VIDEO_STORY_MISSING
+MEGAGROUP_GEO_REQUIRED This method can only be invoked on a geogroup.
+MEGAGROUP_ID_INVALID Invalid supergroup ID.
+MEGAGROUP_PREHISTORY_HIDDEN Group with hidden history for new members can't be set as discussion groups.
+MEGAGROUP_REQUIRED You can only use this method on a supergroup.
+MESSAGE_AUTHOR_REQUIRED Message author required.
+MESSAGE_DELETE_FORBIDDEN You can't delete one of the messages you tried to delete, most likely because it is a service message.
+MESSAGE_EDIT_TIME_EXPIRED You can't edit this message anymore, too much time has passed since its creation.
+MESSAGE_EMPTY The provided message is empty.
+MESSAGE_IDS_EMPTY No message ids were provided.
+MESSAGE_ID_INVALID The provided message id is invalid.
+MESSAGE_NOT_MODIFIED The provided message data is identical to the previous message data, the message wasn't modified.
+MESSAGE_POLL_CLOSED Poll closed.
+MESSAGE_TOO_LONG The provided message is too long.
+METHOD_INVALID The specified method is invalid.
+MIN_DATE_INVALID The specified minimum date is invalid.
+MSG_ID_INVALID Invalid message ID provided.
+MSG_TOO_OLD [`chat_read_mark_expire_period` seconds](https://core.telegram.org/api/config#chat-read-mark-expire-period) have passed since the message was sent, read receipts were deleted.
+MSG_WAIT_FAILED A waiting call returned an error.
+MULTI_MEDIA_TOO_LONG Too many media files for album.
+NEW_SALT_INVALID The new salt is invalid.
+NEW_SETTINGS_EMPTY No password is set on the current account, and no new password was specified in `new_settings`.
+NEW_SETTINGS_INVALID The new password settings are invalid.
+NEXT_OFFSET_INVALID The specified offset is longer than 64 bytes.
+NOT_ELIGIBLE You are not eligible to take part in Telegram's Premium for SMS initiative
+OFFSET_INVALID The provided offset is invalid.
+OFFSET_PEER_ID_INVALID The provided offset peer is invalid.
+OPTIONS_TOO_MUCH Too many options provided.
+OPTION_INVALID Invalid option selected.
+ORDER_INVALID The specified username order is invalid.
+PACK_SHORT_NAME_INVALID Short pack name invalid.
+PACK_SHORT_NAME_OCCUPIED A stickerpack with this name already exists.
+PACK_TITLE_INVALID The stickerpack title is invalid.
+PARTICIPANTS_TOO_FEW Not enough participants.
+PARTICIPANT_ID_INVALID The specified participant ID is invalid.
+PARTICIPANT_JOIN_MISSING Trying to enable a presentation, when the user hasn't joined the Video Chat with [phone.joinGroupCall](https://core.telegram.org/method/phone.joinGroupCall).
+PARTICIPANT_VERSION_OUTDATED The other participant does not use an up to date telegram client with support for calls.
+PASSWORD_EMPTY The provided password is empty.
+PASSWORD_HASH_INVALID The provided password hash is invalid.
+PASSWORD_MISSING You must enable 2FA in order to transfer ownership of a channel.
+PASSWORD_RECOVERY_EXPIRED The recovery code has expired.
+PASSWORD_RECOVERY_NA No email was set, can't recover password via email.
+PASSWORD_REQUIRED A [2FA password](https://core.telegram.org/api/srp) must be configured to use Telegram Passport.
+PASSWORD_TOO_FRESH_X The password was modified less than 24 hours ago, try again in {value} seconds.
+PAYMENT_PROVIDER_INVALID The specified payment provider is invalid.
+PEERS_LIST_EMPTY The specified list of peers is empty.
+PEER_HISTORY_EMPTY You can't pin an empty chat with a user.
+PEER_ID_INVALID The provided peer id is invalid.
+PEER_ID_NOT_SUPPORTED The provided peer ID is not supported.
+PERSISTENT_TIMESTAMP_EMPTY Persistent timestamp empty.
+PERSISTENT_TIMESTAMP_INVALID Persistent timestamp invalid.
+PHONE_CODE_EMPTY phone_code is missing.
+PHONE_CODE_EXPIRED The phone code you provided has expired.
+PHONE_CODE_HASH_EMPTY phone_code_hash is missing.
+PHONE_CODE_INVALID The provided phone code is invalid.
+PHONE_HASH_EXPIRED An invalid or expired `phone_code_hash` was provided.
+PHONE_NOT_OCCUPIED No user is associated to the specified phone number.
+PHONE_NUMBER_APP_SIGNUP_FORBIDDEN You can't sign up using this app.
+PHONE_NUMBER_BANNED The provided phone number is banned from telegram.
+PHONE_NUMBER_FLOOD You asked for the code too many times.
+PHONE_NUMBER_INVALID The phone number is invalid.
+PHONE_NUMBER_OCCUPIED The phone number is already in use.
+PHONE_NUMBER_UNOCCUPIED The phone number is not yet being used.
+PHONE_PASSWORD_PROTECTED This phone is password protected.
+PHOTO_CONTENT_TYPE_INVALID Photo mime-type invalid.
+PHOTO_CONTENT_URL_EMPTY Photo URL invalid.
+PHOTO_CROP_FILE_MISSING Photo crop file missing.
+PHOTO_CROP_SIZE_SMALL Photo is too small.
+PHOTO_EXT_INVALID The extension of the photo is invalid.
+PHOTO_FILE_MISSING Profile photo file missing.
+PHOTO_ID_INVALID Photo ID invalid.
+PHOTO_INVALID Photo invalid.
+PHOTO_INVALID_DIMENSIONS The photo dimensions are invalid.
+PHOTO_SAVE_FILE_INVALID Internal issues, try again later.
+PHOTO_THUMB_URL_EMPTY Photo thumbnail URL is empty.
+PINNED_DIALOGS_TOO_MUCH Too many pinned dialogs.
+PIN_RESTRICTED You can't pin messages.
+POLL_ANSWERS_INVALID Invalid poll answers were provided.
+POLL_ANSWER_INVALID One of the poll answers is not acceptable.
+POLL_OPTION_DUPLICATE Duplicate poll options provided.
+POLL_OPTION_INVALID Invalid poll option provided.
+POLL_QUESTION_INVALID One of the poll questions is not acceptable.
+POLL_VOTE_REQUIRED Cast a vote in the poll before calling this method.
+PREMIUM_ACCOUNT_REQUIRED A premium account is required to execute this action.
+PREMIUM_SUB_ACTIVE_UNTIL_X You already have a premium subscription active until unixtime {value} .
+PRIVACY_KEY_INVALID The privacy key is invalid.
+PRIVACY_PREMIUM_REQUIRED You need a [Telegram Premium subscription](https://core.telegram.org/api/premium) to send a message to this user.
+PRIVACY_TOO_LONG Too many privacy rules were specified, the current limit is 1000.
+PRIVACY_VALUE_INVALID The specified privacy rule combination is invalid.
+PUBLIC_CHANNEL_MISSING You can only export group call invite links for public chats or channels.
+PUBLIC_KEY_REQUIRED A public key is required.
+QUERY_ID_EMPTY The query ID is empty.
+QUERY_ID_INVALID The query ID is invalid.
+QUERY_TOO_SHORT The query string is too short.
+QUIZ_ANSWER_MISSING You can forward a quiz while hiding the original author only after choosing an option in the quiz.
+QUIZ_CORRECT_ANSWERS_EMPTY No correct quiz answer was specified.
+QUIZ_CORRECT_ANSWERS_TOO_MUCH You specified too many correct answers in a quiz, quizzes can only have one right answer!
+QUIZ_CORRECT_ANSWER_INVALID An invalid value was provided to the correct_answers field.
+QUIZ_MULTIPLE_INVALID Quizzes can't have the multiple_choice flag set!
+RANDOM_ID_EMPTY Random ID empty.
+RANDOM_ID_INVALID A provided random ID is invalid.
+RANDOM_LENGTH_INVALID Random length invalid.
+RANGES_INVALID Invalid range provided.
+REACTIONS_TOO_MANY The message already has exactly `reactions_uniq_max` reaction emojis, you can't react with a new emoji, see [the docs for more info »](/api/config#client-configuration).
+REACTION_EMPTY Empty reaction provided.
+REACTION_INVALID The specified reaction is invalid.
+REPLY_MARKUP_BUY_EMPTY Reply markup for buy button empty.
+REPLY_MARKUP_INVALID The provided reply markup is invalid.
+REPLY_MARKUP_TOO_LONG The specified reply_markup is too long.
+REPLY_MESSAGE_ID_INVALID The specified reply-to message ID is invalid.
+REPLY_TO_INVALID The specified `reply_to` field is invalid.
+REPLY_TO_USER_INVALID The replied-to user is invalid.
+RESET_REQUEST_MISSING No password reset is in progress.
+RESULTS_TOO_MUCH Too many results were provided.
+RESULT_ID_DUPLICATE You provided a duplicate result ID.
+RESULT_ID_EMPTY Result ID empty.
+RESULT_ID_INVALID One of the specified result IDs is invalid.
+RESULT_TYPE_INVALID Result type invalid.
+REVOTE_NOT_ALLOWED You cannot change your vote.
+RIGHTS_NOT_MODIFIED The new admin rights are equal to the old rights, no change was made.
+RIGHT_FORBIDDEN Your admin rights do not allow you to do this.
+RSA_DECRYPT_FAILED Internal RSA decryption failed.
+SCHEDULE_BOT_NOT_ALLOWED Bots cannot schedule messages.
+SCHEDULE_DATE_INVALID Invalid schedule date provided.
+SCHEDULE_DATE_TOO_LATE You can't schedule a message this far in the future.
+SCHEDULE_STATUS_PRIVATE Can't schedule until user is online, if the user's last seen timestamp is hidden by their privacy settings.
+SCHEDULE_TOO_MUCH There are too many scheduled messages.
+SCORE_INVALID The specified game score is invalid.
+SEARCH_QUERY_EMPTY The search query is empty.
+SEARCH_WITH_LINK_NOT_SUPPORTED You cannot provide a search query and an invite link at the same time.
+SECONDS_INVALID Invalid duration provided.
+SEND_AS_PEER_INVALID You can't send messages as the specified peer.
+SEND_MESSAGE_MEDIA_INVALID Invalid media provided.
+SEND_MESSAGE_TYPE_INVALID The message type is invalid.
+SENSITIVE_CHANGE_FORBIDDEN You can't change your sensitive content settings.
+SESSION_TOO_FRESH_X This session was created less than 24 hours ago, try again in {value} seconds.
+SETTINGS_INVALID Invalid settings were provided.
+SHA256_HASH_INVALID The provided SHA256 hash is invalid.
+SHORT_NAME_INVALID The specified short name is invalid.
+SHORT_NAME_OCCUPIED The specified short name is already in use.
+SLOTS_EMPTY The specified slot list is empty.
+SLOWMODE_MULTI_MSGS_DISABLED Slowmode is enabled, you cannot forward multiple messages to this group.
+SLOWMODE_WAIT_X Slowmode is enabled in this chat: wait {value} seconds before sending another message to this chat.
+SLUG_INVALID The specified invoice slug is invalid.
+SMS_CODE_CREATE_FAILED An error occurred while creating the SMS code.
+SRP_ID_INVALID Invalid SRP ID provided.
+SRP_PASSWORD_CHANGED Password has changed.
+START_PARAM_EMPTY The start parameter is empty.
+START_PARAM_INVALID Start parameter invalid.
+START_PARAM_TOO_LONG Start parameter is too long.
+STICKERPACK_STICKERS_TOO_MUCH There are too many stickers in this stickerpack, you can't add any more.
+STICKERSET_INVALID The provided sticker set is invalid.
+STICKERS_EMPTY No sticker provided.
+STICKERS_TOO_MUCH There are too many stickers in this stickerpack, you can't add any more.
+STICKER_DOCUMENT_INVALID The specified sticker document is invalid.
+STICKER_EMOJI_INVALID Sticker emoji invalid.
+STICKER_FILE_INVALID Sticker file invalid.
+STICKER_GIF_DIMENSIONS The specified video sticker has invalid dimensions.
+STICKER_ID_INVALID The provided sticker ID is invalid.
+STICKER_INVALID The provided sticker is invalid.
+STICKER_MIME_INVALID The specified sticker MIME type is invalid.
+STICKER_PNG_DIMENSIONS Sticker png dimensions invalid.
+STICKER_PNG_NOPNG One of the specified stickers is not a valid PNG file.
+STICKER_TGS_NODOC You must send the animated sticker as a document.
+STICKER_TGS_NOTGS Invalid TGS sticker provided.
+STICKER_THUMB_PNG_NOPNG Incorrect stickerset thumb file provided, PNG / WEBP expected.
+STICKER_THUMB_TGS_NOTGS Incorrect stickerset TGS thumb file provided.
+STICKER_VIDEO_BIG The specified video sticker is too big.
+STICKER_VIDEO_NODOC You must send the video sticker as a document.
+STICKER_VIDEO_NOWEBM The specified video sticker is not in webm format.
+STORIES_NEVER_CREATED This peer hasn't ever posted any stories.
+STORIES_TOO_MUCH You have hit the maximum active stories limit as specified by the [`story_expiring_limit_*` client configuration parameters](https://core.telegram.org/api/config#story-expiring-limit-default): you should buy a [Premium](/api/premium) subscription, delete an active story, or wait for the oldest story to expire.
+STORY_ID_EMPTY You specified no story IDs.
+STORY_ID_INVALID The specified story ID is invalid.
+STORY_NOT_MODIFIED The new story information you passed is equal to the previous story information, thus it wasn't modified.
+STORY_PERIOD_INVALID The specified story period is invalid for this account.
+STORY_SEND_FLOOD_MONTHLY_X You've hit the monthly story limit as specified by the [`stories_sent_monthly_limit_*` client configuration parameters](https://core.telegram.org/api/config#stories-sent-monthly-limit-default): wait for the specified number of seconds before posting a new story.
+STORY_SEND_FLOOD_WEEKLY_X You've hit the weekly story limit as specified by the [`stories_sent_weekly_limit_*` client configuration parameters](https://core.telegram.org/api/config#stories-sent-weekly-limit-default): wait for the specified number of seconds before posting a new story.
+SWITCH_PM_TEXT_EMPTY The switch_pm.text field was empty.
+TAKEOUT_INIT_DELAY_X Sorry, for security reasons, you will be able to begin downloading your data in {value} seconds. We have notified all your devices about the export request to make sure it's authorized and to give you time to react if it's not.
+TAKEOUT_INVALID The specified takeout ID is invalid.
+TAKEOUT_REQUIRED A [takeout](https://core.telegram.org/api/takeout) session needs to be initialized first, [see here » for more info](/api/takeout).
+TASK_ALREADY_EXISTS An email reset was already requested.
+TEMP_AUTH_KEY_ALREADY_BOUND The passed temporary key is already bound to another **perm_auth_key_id**.
+TEMP_AUTH_KEY_EMPTY No temporary auth key provided.
+THEME_FILE_INVALID Invalid theme file provided.
+THEME_FORMAT_INVALID Invalid theme format provided.
+THEME_INVALID Invalid theme provided.
+THEME_MIME_INVALID The theme's MIME type is invalid.
+THEME_TITLE_INVALID The specified theme title is invalid.
+TITLE_INVALID The specified stickerpack title is invalid.
+TMP_PASSWORD_DISABLED The temporary password is disabled.
+TOKEN_EMPTY The specified token is empty.
+TOKEN_INVALID The provided token is invalid.
+TOKEN_TYPE_INVALID The specified token type is invalid.
+TOPICS_EMPTY You specified no topic IDs.
+TOPIC_CLOSED This topic was closed, you can't send messages to it anymore.
+TOPIC_CLOSE_SEPARATELY The `close` flag cannot be provided together with any of the other flags.
+TOPIC_DELETED The specified topic was deleted.
+TOPIC_HIDE_SEPARATELY The `hide` flag cannot be provided together with any of the other flags.
+TOPIC_ID_INVALID The specified topic ID is invalid.
+TOPIC_NOT_MODIFIED The updated topic info is equal to the current topic info, nothing was changed.
+TOPIC_TITLE_EMPTY The specified topic title is empty.
+TO_LANG_INVALID The specified destination language is invalid.
+TRANSCRIPTION_FAILED Audio transcription failed.
+TTL_DAYS_INVALID The provided TTL is invalid.
+TTL_MEDIA_INVALID Invalid media Time To Live was provided.
+TTL_PERIOD_INVALID The specified TTL period is invalid.
+TYPES_EMPTY No top peer type was provided.
+UNTIL_DATE_INVALID Invalid until date provided.
+URL_INVALID Invalid URL provided.
+USAGE_LIMIT_INVALID The specified usage limit is invalid.
+USERNAMES_ACTIVE_TOO_MUCH The maximum number of active usernames was reached.
+USERNAME_INVALID The provided username is not valid.
+USERNAME_NOT_MODIFIED The username was not modified.
+USERNAME_NOT_OCCUPIED The provided username is not occupied.
+USERNAME_OCCUPIED The provided username is already occupied.
+USERNAME_PURCHASE_AVAILABLE The specified username can be purchased on https://fragment.com.
+USERPIC_UPLOAD_REQUIRED You must have a profile picture to publish your geolocation.
+USERS_TOO_FEW Not enough users (to create a chat, for example).
+USERS_TOO_MUCH The maximum number of users has been exceeded (to create a chat, for example).
+USER_ADMIN_INVALID You're not an admin.
+USER_ALREADY_INVITED You have already invited this user.
+USER_ALREADY_PARTICIPANT The user is already in the group.
+USER_BANNED_IN_CHANNEL You're banned from sending messages in supergroups/channels.
+USER_BLOCKED User blocked.
+USER_BOT Bots can only be admins in channels.
+USER_BOT_INVALID User accounts must provide the `bot` method parameter when calling this method. If there is no such method parameter, this method can only be invoked by bot accounts.
+USER_BOT_REQUIRED This method can only be called by a bot.
+USER_CHANNELS_TOO_MUCH One of the users you tried to add is already in too many channels/supergroups.
+USER_CREATOR You can't leave this channel, because you're its creator.
+USER_DELETED You can't send this secret message because the other participant deleted their account.
+USER_ID_INVALID The provided user ID is invalid.
+USER_INVALID Invalid user provided.
+USER_IS_BLOCKED You were blocked by this user.
+USER_IS_BOT Bots can't send messages to other bots.
+USER_KICKED This user was kicked from this supergroup/channel.
+USER_NOT_MUTUAL_CONTACT The provided user is not a mutual contact.
+USER_NOT_PARTICIPANT You're not a member of this supergroup/channel.
+USER_PRIVACY_RESTRICTED The user's privacy settings do not allow you to do this.
+USER_PUBLIC_MISSING Cannot generate a link to stories posted by a peer without a username.
+USER_RESTRICTED You're spamreported, you can't create channels or chats.
+USER_VOLUME_INVALID The specified user volume is invalid.
+VENUE_ID_INVALID The specified venue ID is invalid.
+VIDEO_CONTENT_TYPE_INVALID The video's content type is invalid.
+VIDEO_FILE_INVALID The specified video file is invalid.
+VIDEO_TITLE_EMPTY The specified video title is empty.
+VOICE_MESSAGES_FORBIDDEN This user's privacy settings forbid you from sending voice messages.
+WALLPAPER_FILE_INVALID The specified wallpaper file is invalid.
+WALLPAPER_INVALID The specified wallpaper is invalid.
+WALLPAPER_MIME_INVALID The specified wallpaper MIME type is invalid.
+WALLPAPER_NOT_FOUND The specified wallpaper could not be found.
+WC_CONVERT_URL_INVALID WC convert URL invalid.
+WEBDOCUMENT_INVALID Invalid webdocument URL provided.
+WEBDOCUMENT_MIME_INVALID Invalid webdocument mime type provided.
+WEBDOCUMENT_SIZE_TOO_BIG Webdocument is too big!
+WEBDOCUMENT_URL_INVALID The specified webdocument URL is invalid.
+WEBPAGE_CURL_FAILED Failure while fetching the webpage with cURL.
+WEBPAGE_MEDIA_EMPTY Webpage media empty.
+WEBPAGE_NOT_FOUND A preview for the specified webpage `url` could not be generated.
+WEBPAGE_URL_INVALID The specified webpage `url` is invalid.
+WEBPUSH_AUTH_INVALID The specified web push authentication secret is invalid.
+WEBPUSH_KEY_INVALID The specified web push elliptic curve Diffie-Hellman public key is invalid.
+WEBPUSH_TOKEN_INVALID The specified web push token is invalid.
+YOU_BLOCKED_USER You blocked this user.
\ No newline at end of file
diff --git a/compiler/errors/source/406_NOT_ACCEPTABLE.tsv b/compiler/errors/source/406_NOT_ACCEPTABLE.tsv
index 831bc663..6d4ba0ab 100644
--- a/compiler/errors/source/406_NOT_ACCEPTABLE.tsv
+++ b/compiler/errors/source/406_NOT_ACCEPTABLE.tsv
@@ -1,22 +1,525 @@
id message
+2FA_CONFIRM_WAIT_X Since this account is active and protected by a 2FA password, we will delete it in 1 week for security purposes. You can cancel this process at any time, you'll be able to reset your account in {value} seconds.
+ABOUT_TOO_LONG About string too long.
+ACCESS_TOKEN_EXPIRED Access token expired.
+ACCESS_TOKEN_INVALID Access token invalid.
+ADDRESS_INVALID The specified geopoint address is invalid.
+ADMINS_TOO_MUCH There are too many admins.
+ADMIN_ID_INVALID The specified admin ID is invalid.
+ADMIN_RANK_EMOJI_NOT_ALLOWED An admin rank cannot contain emojis.
+ADMIN_RANK_INVALID The specified admin rank is invalid.
+ADMIN_RIGHTS_EMPTY The chatAdminRights constructor passed in keyboardButtonRequestPeer.peer_type.user_admin_rights has no rights set (i.e. flags is 0).
+ALBUM_PHOTOS_TOO_MANY You have uploaded too many profile photos, delete some before retrying.
+ANONYMOUS_REACTIONS_DISABLED Sorry, anonymous administrators cannot leave reactions or participate in polls.
+API_ID_INVALID API ID invalid.
+API_ID_PUBLISHED_FLOOD This API id was published somewhere, you can't use it now.
+ARTICLE_TITLE_EMPTY The title of the article is empty.
+AUDIO_CONTENT_URL_EMPTY The remote URL specified in the content field is empty.
+AUDIO_TITLE_EMPTY An empty audio title was provided.
+AUTH_BYTES_INVALID The provided authorization is invalid.
AUTH_KEY_DUPLICATED The same authorization key (session file) was used in more than one place simultaneously. You must delete your session file and log in again with your phone number or bot token
-CHANNEL_PRIVATE The channel/supergroup is not accessible
-CHANNEL_TOO_LARGE ะกhannel is too large to be deleted. Contact support for removal
-CHAT_FORWARDS_RESTRICTED You can't forward messages from a protected chat
-FILEREF_UPGRADE_NEEDED The file reference has expired and you must use a refreshed one by obtaining the original media message
-FRESH_CHANGE_ADMINS_FORBIDDEN You were just elected admin, you can't add or modify other admins yet
-FRESH_CHANGE_PHONE_FORBIDDEN You can't change your phone number because your session was logged-in recently
-FRESH_RESET_AUTHORISATION_FORBIDDEN You can't terminate other authorized sessions because the current was logged-in recently
-GIFTCODE_NOT_ALLOWED Giftcode not allowed
-INVITE_HASH_EXPIRED The chat the user tried to join has expired and is not valid anymore
-PHONE_NUMBER_INVALID The phone number is invalid
-PHONE_PASSWORD_FLOOD You have tried to log-in too many times
-PREMIUM_CURRENTLY_UNAVAILABLE Premium currently unavailable
-PREVIOUS_CHAT_IMPORT_ACTIVE_WAIT_XMIN Similar to a flood wait, must wait {value} minutes
-SEND_CODE_UNAVAILABLE Returned when all available options for this type of number were already used (e.g. flash-call, then SMS, then this error might be returned to trigger a second resend)
-STICKERSET_INVALID The sticker set is invalid
-STICKERSET_OWNER_ANONYMOUS This sticker set can't be used as the group's sticker set because it was created by one of its anonymous admins
-UPDATE_APP_TO_LOGIN Update app to login
-USERPIC_PRIVACY_REQUIRED You need to disable privacy settings for your profile picture in order to make your geolocation public
-USERPIC_UPLOAD_REQUIRED You must have a profile picture to publish your geolocation
-USER_RESTRICTED You are limited/restricted. You can't perform this action
\ No newline at end of file
+AUTH_RESTART Restart the authorization process.
+AUTH_TOKEN_ALREADY_ACCEPTED The specified auth token was already accepted.
+AUTH_TOKEN_EXCEPTION An error occurred while importing the auth token.
+AUTH_TOKEN_EXPIRED The authorization token has expired.
+AUTH_TOKEN_INVALID The specified auth token is invalid.
+AUTH_TOKEN_INVALIDX The specified auth token is invalid.
+AUTOARCHIVE_NOT_AVAILABLE The autoarchive setting is not available at this time: please check the value of the [autoarchive_setting_available field in client config »](https://core.telegram.org/api/config#client-configuration) before calling this method.
+BANK_CARD_NUMBER_INVALID The specified card number is invalid.
+BANNED_RIGHTS_INVALID You provided some invalid flags in the banned rights.
+BOOSTS_EMPTY No boost slots were specified.
+BOOSTS_REQUIRED The specified channel must first be [boosted by its users](https://core.telegram.org/api/boost) in order to perform this action.
+BOOST_NOT_MODIFIED You're already [boosting](https://core.telegram.org/api/boost) the specified channel.
+BOOST_PEER_INVALID The specified `boost_peer` is invalid.
+BOTS_TOO_MUCH There are too many bots in this chat/channel.
+BOT_APP_INVALID The specified bot app is invalid.
+BOT_APP_SHORTNAME_INVALID The specified bot app short name is invalid.
+BOT_CHANNELS_NA Bots can't edit admin privileges.
+BOT_COMMAND_DESCRIPTION_INVALID The specified command description is invalid.
+BOT_COMMAND_INVALID The specified command is invalid.
+BOT_DOMAIN_INVALID Bot domain invalid.
+BOT_GROUPS_BLOCKED This bot can't be added to groups.
+BOT_INLINE_DISABLED This bot can't be used in inline mode.
+BOT_INVALID This is not a valid bot.
+BOT_MISSING Only bots can call this method, please use [@stickers](https://t.me/stickers) if you're a user.
+BOT_ONESIDE_NOT_AVAIL Bots can't pin messages in PM just for themselves.
+BOT_PAYMENTS_DISABLED Please enable bot payments in botfather before calling this method.
+BOT_RESPONSE_TIMEOUT A timeout occurred while fetching data from the bot.
+BOT_SCORE_NOT_MODIFIED The score wasn't modified.
+BOT_WEBVIEW_DISABLED A webview cannot be opened in the specified conditions: emitted for example if `from_bot_menu` or `url` are set and `peer` is not the chat with the bot.
+BROADCAST_FORBIDDEN Channel poll voters and reactions cannot be fetched to prevent deanonymization.
+BROADCAST_ID_INVALID Broadcast ID invalid.
+BROADCAST_PUBLIC_VOTERS_FORBIDDEN You can't forward polls with public voters.
+BROADCAST_REQUIRED This method can only be called on a channel, please use stats.getMegagroupStats for supergroups.
+BUTTON_DATA_INVALID The data of one or more of the buttons you provided is invalid.
+BUTTON_TEXT_INVALID The specified button text is invalid.
+BUTTON_TYPE_INVALID The type of one or more of the buttons you provided is invalid.
+BUTTON_URL_INVALID Button URL invalid.
+BUTTON_USER_PRIVACY_RESTRICTED The privacy setting of the user specified in a [inputKeyboardButtonUserProfile](/constructor/inputKeyboardButtonUserProfile) button do not allow creating such a button.
+CALL_ALREADY_ACCEPTED The call was already accepted.
+CALL_ALREADY_DECLINED The call was already declined.
+CALL_OCCUPY_FAILED The call failed because the user is already making another call.
+CALL_PEER_INVALID The provided call peer object is invalid.
+CALL_PROTOCOL_COMPAT_LAYER_INVALID The other side of the call does not support any of the VoIP protocols supported by the local client, as specified by the `protocol.layer` and `protocol.library_versions` fields.
+CALL_PROTOCOL_FLAGS_INVALID Call protocol flags invalid.
+CDN_METHOD_INVALID You can't call this method in a CDN DC.
+CDN_UPLOAD_TIMEOUT A server-side timeout occurred while reuploading the file to the CDN DC.
+CHANNELS_ADMIN_LOCATED_TOO_MUCH The user has reached the limit of public geogroups.
+CHANNELS_ADMIN_PUBLIC_TOO_MUCH You're admin of too many public channels, make some channels private to change the username of this channel.
+CHANNELS_TOO_MUCH You have joined too many channels/supergroups.
+CHANNEL_FORUM_MISSING This supergroup is not a forum.
+CHANNEL_ID_INVALID The specified supergroup ID is invalid.
+CHANNEL_INVALID The provided channel is invalid.
+CHANNEL_PARICIPANT_MISSING The current user is not in the channel.
+CHANNEL_PRIVATE You haven't joined this channel/supergroup.
+CHANNEL_PUBLIC_GROUP_NA channel/supergroup not available.
+CHANNEL_TOO_BIG This channel has too many participants (>1000) to be deleted.
+CHANNEL_TOO_LARGE Channel is too large to be deleted; this error is issued when trying to delete channels with more than 1000 members (subject to change).
+CHATLIST_EXCLUDE_INVALID The specified `exclude_peers` are invalid.
+CHAT_ABOUT_NOT_MODIFIED About text has not changed.
+CHAT_ABOUT_TOO_LONG Chat about too long.
+CHAT_ADMIN_INVITE_REQUIRED You do not have the rights to do this.
+CHAT_ADMIN_REQUIRED You must be an admin in this chat to do this.
+CHAT_DISCUSSION_UNALLOWED You can't enable forum topics in a discussion group linked to a channel.
+CHAT_FORWARDS_RESTRICTED You can't forward messages from a protected chat.
+CHAT_GUEST_SEND_FORBIDDEN You join the discussion group before commenting, see [here »](/api/discussion#requiring-users-to-join-the-group) for more info.
+CHAT_ID_EMPTY The provided chat ID is empty.
+CHAT_ID_GENERATE_FAILED Failure while generating the chat ID.
+CHAT_ID_INVALID The provided chat id is invalid.
+CHAT_INVALID Invalid chat.
+CHAT_INVITE_PERMANENT You can't set an expiration date on permanent invite links.
+CHAT_LINK_EXISTS The chat is public, you can't hide the history to new users.
+CHAT_NOT_MODIFIED No changes were made to chat information because the new information you passed is identical to the current information.
+CHAT_PUBLIC_REQUIRED You can only enable join requests in public groups.
+CHAT_RESTRICTED You can't send messages in this chat, you were restricted.
+CHAT_REVOKE_DATE_UNSUPPORTED `min_date` and `max_date` are not available for using with non-user peers.
+CHAT_SEND_AUDIOS_FORBIDDEN You can't send audio messages in this chat.
+CHAT_SEND_DOCS_FORBIDDEN You can't send documents in this chat.
+CHAT_SEND_GAME_FORBIDDEN You can't send a game to this chat.
+CHAT_SEND_GIFS_FORBIDDEN You can't send gifs in this chat.
+CHAT_SEND_INLINE_FORBIDDEN You can't send inline messages in this group.
+CHAT_SEND_MEDIA_FORBIDDEN You can't send media in this chat.
+CHAT_SEND_PHOTOS_FORBIDDEN You can't send photos in this chat.
+CHAT_SEND_PLAIN_FORBIDDEN You can't send non-media (text) messages in this chat.
+CHAT_SEND_POLL_FORBIDDEN You can't send polls in this chat.
+CHAT_SEND_STICKERS_FORBIDDEN You can't send stickers in this chat.
+CHAT_SEND_VIDEOS_FORBIDDEN You can't send videos in this chat.
+CHAT_SEND_VOICES_FORBIDDEN You can't send voice recordings in this chat.
+CHAT_TITLE_EMPTY No chat title provided.
+CHAT_TOO_BIG This method is not available for groups with more than `chat_read_mark_size_threshold` members, [see client configuration »](https://core.telegram.org/api/config#client-configuration).
+CHAT_WRITE_FORBIDDEN You can't write in this chat.
+CODE_EMPTY The provided code is empty.
+CODE_HASH_INVALID Code hash invalid.
+CODE_INVALID Code invalid.
+COLOR_INVALID The specified color palette ID was invalid.
+CONNECTION_API_ID_INVALID The provided API id is invalid.
+CONNECTION_APP_VERSION_EMPTY App version is empty.
+CONNECTION_LAYER_INVALID Layer invalid.
+CONTACT_ADD_MISSING Contact to add is missing.
+CONTACT_ID_INVALID The provided contact ID is invalid.
+CONTACT_MISSING The specified user is not a contact.
+CONTACT_NAME_EMPTY Contact name empty.
+CONTACT_REQ_MISSING Missing contact request.
+CREATE_CALL_FAILED An error occurred while creating the call.
+CURRENCY_TOTAL_AMOUNT_INVALID The total amount of all prices is invalid.
+CUSTOM_REACTIONS_TOO_MANY Too many custom reactions were specified.
+DATA_INVALID Encrypted data invalid.
+DATA_JSON_INVALID The provided JSON data is invalid.
+DATA_TOO_LONG Data too long.
+DATE_EMPTY Date empty.
+DC_ID_INVALID The provided DC ID is invalid.
+DH_G_A_INVALID g_a invalid.
+DOCUMENT_INVALID The specified document is invalid.
+EDIT_BOT_INVITE_FORBIDDEN Normal users can't edit invites that were created by bots.
+EMAIL_HASH_EXPIRED Email hash expired.
+EMAIL_INVALID The specified email is invalid.
+EMAIL_NOT_SETUP In order to change the login email with emailVerifyPurposeLoginChange, an existing login email must already be set using emailVerifyPurposeLoginSetup.
+EMAIL_UNCONFIRMED Email unconfirmed.
+EMAIL_UNCONFIRMED_X The provided email isn't confirmed, {value} is the length of the verification code that was just sent to the email: use [account.verifyEmail](https://core.telegram.org/method/account.verifyEmail) to enter the received verification code and enable the recovery email.
+EMAIL_VERIFY_EXPIRED The verification email has expired.
+EMOJI_INVALID The specified theme emoji is valid.
+EMOJI_MARKUP_INVALID The specified `video_emoji_markup` was invalid.
+EMOJI_NOT_MODIFIED The theme wasn't changed.
+EMOTICON_EMPTY The emoji is empty.
+EMOTICON_INVALID The specified emoji is invalid.
+EMOTICON_STICKERPACK_MISSING inputStickerSetDice.emoji cannot be empty.
+ENCRYPTED_MESSAGE_INVALID Encrypted message invalid.
+ENCRYPTION_ALREADY_ACCEPTED Secret chat already accepted.
+ENCRYPTION_ALREADY_DECLINED The secret chat was already declined.
+ENCRYPTION_DECLINED The secret chat was declined.
+ENCRYPTION_ID_INVALID The provided secret chat ID is invalid.
+ENTITIES_TOO_LONG You provided too many styled message entities.
+ENTITY_BOUNDS_INVALID A specified [entity offset or length](/api/entities#entity-length) is invalid, see [here »](/api/entities#entity-length) for info on how to properly compute the entity offset/length.
+ENTITY_MENTION_USER_INVALID You mentioned an invalid user.
+ERROR_TEXT_EMPTY The provided error message is empty.
+EXPIRE_DATE_INVALID The specified expiration date is invalid.
+EXPORT_CARD_INVALID Provided card is invalid.
+EXTERNAL_URL_INVALID External URL invalid.
+FILEREF_UPGRADE_NEEDED The client has to be updated in order to support [file references](https://core.telegram.org/api/file_reference).
+FILE_CONTENT_TYPE_INVALID File content-type is invalid.
+FILE_EMTPY An empty file was provided.
+FILE_ID_INVALID The provided file id is invalid.
+FILE_PARTS_INVALID The number of file parts is invalid.
+FILE_PART_EMPTY The provided file part is empty.
+FILE_PART_INVALID The file part number is invalid.
+FILE_PART_LENGTH_INVALID The length of a file part is invalid.
+FILE_PART_SIZE_CHANGED Provided file part size has changed.
+FILE_PART_SIZE_INVALID The provided file part size is invalid.
+FILE_PART_TOO_BIG The uploaded file part is too big.
+FILE_REFERENCE_EMPTY An empty [file reference](https://core.telegram.org/api/file_reference) was specified.
+FILE_REFERENCE_EXPIRED File reference expired, it must be refetched as described in [the documentation](https://core.telegram.org/api/file_reference).
+FILE_REFERENCE_INVALID The specified [file reference](https://core.telegram.org/api/file_reference) is invalid.
+FILE_TITLE_EMPTY An empty file title was specified.
+FILE_TOKEN_INVALID The specified file token is invalid.
+FILTER_ID_INVALID The specified filter ID is invalid.
+FILTER_INCLUDE_EMPTY The include_peers vector of the filter is empty.
+FILTER_NOT_SUPPORTED The specified filter cannot be used in this context.
+FILTER_TITLE_EMPTY The title field of the filter is empty.
+FIRSTNAME_INVALID The first name is invalid.
+FOLDER_ID_EMPTY An empty folder ID was specified.
+FOLDER_ID_INVALID Invalid folder ID.
+FORUM_ENABLED You can't execute the specified action because the group is a [forum](https://core.telegram.org/api/forum), disable forum functionality to continue.
+FRESH_CHANGE_ADMINS_FORBIDDEN You were just elected admin, you can't add or modify other admins yet.
+FRESH_CHANGE_PHONE_FORBIDDEN You can't change phone number right after logging in, please wait at least 24 hours.
+FRESH_RESET_AUTHORISATION_FORBIDDEN You can't logout other sessions if less than 24 hours have passed since you logged on the current session.
+FROM_MESSAGE_BOT_DISABLED Bots can't use fromMessage min constructors.
+FROM_PEER_INVALID The specified from_id is invalid.
+GAME_BOT_INVALID Bots can't send another bot's game.
+GENERAL_MODIFY_ICON_FORBIDDEN You can't modify the icon of the "General" topic.
+GEO_POINT_INVALID Invalid geoposition provided.
+GIFT_SLUG_EXPIRED The specified gift slug has expired.
+GIFT_SLUG_INVALID The specified slug is invalid.
+GIF_CONTENT_TYPE_INVALID GIF content-type invalid.
+GIF_ID_INVALID The provided GIF ID is invalid.
+GRAPH_EXPIRED_RELOAD This graph has expired, please obtain a new graph token.
+GRAPH_INVALID_RELOAD Invalid graph token provided, please reload the stats and provide the updated token.
+GRAPH_OUTDATED_RELOAD The graph is outdated, please get a new async token using stats.getBroadcastStats.
+GROUPCALL_ALREADY_DISCARDED The group call was already discarded.
+GROUPCALL_ALREADY_STARTED The groupcall has already started, you can join directly using [phone.joinGroupCall](https://core.telegram.org/method/phone.joinGroupCall).
+GROUPCALL_FORBIDDEN The group call has already ended.
+GROUPCALL_INVALID The specified group call is invalid.
+GROUPCALL_JOIN_MISSING You haven't joined this group call.
+GROUPCALL_NOT_MODIFIED Group call settings weren't modified.
+GROUPCALL_SSRC_DUPLICATE_MUCH The app needs to retry joining the group call with a new SSRC value.
+GROUPED_MEDIA_INVALID Invalid grouped media.
+HASH_INVALID The provided hash is invalid.
+HIDE_REQUESTER_MISSING The join request was missing or was already handled.
+IMAGE_PROCESS_FAILED Failure while processing image.
+IMPORT_FILE_INVALID The specified chat export file is invalid.
+IMPORT_FORMAT_UNRECOGNIZED The specified chat export file was exported from an unsupported chat app.
+IMPORT_ID_INVALID The specified import ID is invalid.
+IMPORT_TOKEN_INVALID The specified token is invalid.
+INLINE_BOT_REQUIRED Only the inline bot can edit message.
+INLINE_RESULT_EXPIRED The inline query expired.
+INPUT_CHATLIST_INVALID The specified folder is invalid.
+INPUT_FILTER_INVALID The specified filter is invalid.
+INPUT_TEXT_EMPTY The specified text is empty.
+INPUT_TEXT_TOO_LONG The specified text is too long.
+INPUT_USER_DEACTIVATED The specified user was deleted.
+INVITES_TOO_MUCH The maximum number of per-folder invites specified by the `chatlist_invites_limit_default`/`chatlist_invites_limit_premium` [client configuration parameters »](/api/config#chatlist-invites-limit-default) was reached.
+INVITE_FORBIDDEN_WITH_JOINAS If the user has anonymously joined a group call as a channel, they can't invite other users to the group call because that would cause deanonymization, because the invite would be sent using the original user ID, not the anonymized channel ID.
+INVITE_HASH_EMPTY The invite hash is empty.
+INVITE_HASH_EXPIRED The invite link has expired.
+INVITE_HASH_INVALID The invite hash is invalid.
+INVITE_REQUEST_SENT You have successfully requested to join this chat or channel.
+INVITE_REVOKED_MISSING The specified invite link was already revoked or is invalid.
+INVITE_SLUG_EMPTY The specified invite slug is empty.
+INVITE_SLUG_EXPIRED The specified chat folder link has expired.
+INVOICE_PAYLOAD_INVALID The specified invoice payload is invalid.
+JOIN_AS_PEER_INVALID The specified peer cannot be used to join a group call.
+LANG_CODE_INVALID The specified language code is invalid.
+LANG_CODE_NOT_SUPPORTED The specified language code is not supported.
+LANG_PACK_INVALID The provided language pack is invalid.
+LASTNAME_INVALID The last name is invalid.
+LIMIT_INVALID The provided limit is invalid.
+LINK_NOT_MODIFIED Discussion link not modified.
+LOCATION_INVALID The provided location is invalid.
+MAX_DATE_INVALID The specified maximum date is invalid.
+MAX_ID_INVALID The provided max ID is invalid.
+MAX_QTS_INVALID The specified max_qts is invalid.
+MD5_CHECKSUM_INVALID The MD5 checksums do not match.
+MEDIA_CAPTION_TOO_LONG The caption is too long.
+MEDIA_EMPTY The provided media object is invalid.
+MEDIA_FILE_INVALID The specified media file is invalid.
+MEDIA_GROUPED_INVALID You tried to send media of different types in an album.
+MEDIA_INVALID Media invalid.
+MEDIA_NEW_INVALID The new media is invalid.
+MEDIA_PREV_INVALID Previous media invalid.
+MEDIA_TTL_INVALID The specified media TTL is invalid.
+MEDIA_TYPE_INVALID The specified media type cannot be used in stories.
+MEDIA_VIDEO_STORY_MISSING
+MEGAGROUP_GEO_REQUIRED This method can only be invoked on a geogroup.
+MEGAGROUP_ID_INVALID Invalid supergroup ID.
+MEGAGROUP_PREHISTORY_HIDDEN Group with hidden history for new members can't be set as discussion groups.
+MEGAGROUP_REQUIRED You can only use this method on a supergroup.
+MESSAGE_AUTHOR_REQUIRED Message author required.
+MESSAGE_DELETE_FORBIDDEN You can't delete one of the messages you tried to delete, most likely because it is a service message.
+MESSAGE_EDIT_TIME_EXPIRED You can't edit this message anymore, too much time has passed since its creation.
+MESSAGE_EMPTY The provided message is empty.
+MESSAGE_IDS_EMPTY No message ids were provided.
+MESSAGE_ID_INVALID The provided message id is invalid.
+MESSAGE_NOT_MODIFIED The provided message data is identical to the previous message data, the message wasn't modified.
+MESSAGE_POLL_CLOSED Poll closed.
+MESSAGE_TOO_LONG The provided message is too long.
+METHOD_INVALID The specified method is invalid.
+MIN_DATE_INVALID The specified minimum date is invalid.
+MSG_ID_INVALID Invalid message ID provided.
+MSG_TOO_OLD [`chat_read_mark_expire_period` seconds](https://core.telegram.org/api/config#chat-read-mark-expire-period) have passed since the message was sent, read receipts were deleted.
+MSG_WAIT_FAILED A waiting call returned an error.
+MULTI_MEDIA_TOO_LONG Too many media files for album.
+NEW_SALT_INVALID The new salt is invalid.
+NEW_SETTINGS_EMPTY No password is set on the current account, and no new password was specified in `new_settings`.
+NEW_SETTINGS_INVALID The new password settings are invalid.
+NEXT_OFFSET_INVALID The specified offset is longer than 64 bytes.
+OFFSET_INVALID The provided offset is invalid.
+OFFSET_PEER_ID_INVALID The provided offset peer is invalid.
+OPTIONS_TOO_MUCH Too many options provided.
+OPTION_INVALID Invalid option selected.
+ORDER_INVALID The specified username order is invalid.
+PACK_SHORT_NAME_INVALID Short pack name invalid.
+PACK_SHORT_NAME_OCCUPIED A stickerpack with this name already exists.
+PACK_TITLE_INVALID The stickerpack title is invalid.
+PARTICIPANTS_TOO_FEW Not enough participants.
+PARTICIPANT_ID_INVALID The specified participant ID is invalid.
+PARTICIPANT_JOIN_MISSING Trying to enable a presentation, when the user hasn't joined the Video Chat with [phone.joinGroupCall](https://core.telegram.org/method/phone.joinGroupCall).
+PARTICIPANT_VERSION_OUTDATED The other participant does not use an up to date telegram client with support for calls.
+PASSWORD_EMPTY The provided password is empty.
+PASSWORD_HASH_INVALID The provided password hash is invalid.
+PASSWORD_MISSING You must enable 2FA in order to transfer ownership of a channel.
+PASSWORD_RECOVERY_EXPIRED The recovery code has expired.
+PASSWORD_RECOVERY_NA No email was set, can't recover password via email.
+PASSWORD_REQUIRED A [2FA password](https://core.telegram.org/api/srp) must be configured to use Telegram Passport.
+PASSWORD_TOO_FRESH_X The password was modified less than 24 hours ago, try again in {value} seconds.
+PAYMENT_PROVIDER_INVALID The specified payment provider is invalid.
+PAYMENT_UNSUPPORTED A detailed description of the error will be received separately as described [here »](https://core.telegram.org/api/errors#406-not-acceptable).
+PEERS_LIST_EMPTY The specified list of peers is empty.
+PEER_HISTORY_EMPTY You can't pin an empty chat with a user.
+PEER_ID_INVALID The provided peer id is invalid.
+PEER_ID_NOT_SUPPORTED The provided peer ID is not supported.
+PERSISTENT_TIMESTAMP_EMPTY Persistent timestamp empty.
+PERSISTENT_TIMESTAMP_INVALID Persistent timestamp invalid.
+PERSISTENT_TIMESTAMP_OUTDATED Channel internal replication issues, try again later (treat this like an RPC_CALL_FAIL).
+PHONE_CODE_EMPTY phone_code is missing.
+PHONE_CODE_EXPIRED The phone code you provided has expired.
+PHONE_CODE_HASH_EMPTY phone_code_hash is missing.
+PHONE_CODE_INVALID The provided phone code is invalid.
+PHONE_HASH_EXPIRED An invalid or expired `phone_code_hash` was provided.
+PHONE_NOT_OCCUPIED No user is associated to the specified phone number.
+PHONE_NUMBER_APP_SIGNUP_FORBIDDEN You can't sign up using this app.
+PHONE_NUMBER_BANNED The provided phone number is banned from telegram.
+PHONE_NUMBER_FLOOD You asked for the code too many times.
+PHONE_NUMBER_INVALID The phone number is invalid.
+PHONE_NUMBER_OCCUPIED The phone number is already in use.
+PHONE_NUMBER_UNOCCUPIED The phone number is not yet being used.
+PHONE_PASSWORD_FLOOD You have tried logging in too many times.
+PHONE_PASSWORD_PROTECTED This phone is password protected.
+PHOTO_CONTENT_TYPE_INVALID Photo mime-type invalid.
+PHOTO_CONTENT_URL_EMPTY Photo URL invalid.
+PHOTO_CROP_FILE_MISSING Photo crop file missing.
+PHOTO_CROP_SIZE_SMALL Photo is too small.
+PHOTO_EXT_INVALID The extension of the photo is invalid.
+PHOTO_FILE_MISSING Profile photo file missing.
+PHOTO_ID_INVALID Photo ID invalid.
+PHOTO_INVALID Photo invalid.
+PHOTO_INVALID_DIMENSIONS The photo dimensions are invalid.
+PHOTO_SAVE_FILE_INVALID Internal issues, try again later.
+PHOTO_THUMB_URL_EMPTY Photo thumbnail URL is empty.
+PINNED_DIALOGS_TOO_MUCH Too many pinned dialogs.
+PIN_RESTRICTED You can't pin messages.
+PLAYMARKET_PURCHASE_USED The Google account logged in the Play Store has already an ongoing Telegram Premium cycle in progress
+POLL_ANSWERS_INVALID Invalid poll answers were provided.
+POLL_ANSWER_INVALID One of the poll answers is not acceptable.
+POLL_OPTION_DUPLICATE Duplicate poll options provided.
+POLL_OPTION_INVALID Invalid poll option provided.
+POLL_QUESTION_INVALID One of the poll questions is not acceptable.
+POLL_VOTE_REQUIRED Cast a vote in the poll before calling this method.
+PREMIUM_ACCOUNT_REQUIRED A premium account is required to execute this action.
+PREMIUM_GIFTCODE_WAS_REFUNDED This gift code can't be redeemed because the giveaway organizer requested a refund
+PREMIUM_SUB_ACTIVE_UNTIL_X You already have a premium subscription active until unixtime {value} .
+PREVIOUS_CHAT_IMPORT_ACTIVE_WAIT_XMIN Import for this chat is already in progress, wait {value} minutes before starting a new one.
+PRIVACY_KEY_INVALID The privacy key is invalid.
+PRIVACY_PREMIUM_REQUIRED You need a [Telegram Premium subscription](https://core.telegram.org/api/premium) to send a message to this user.
+PRIVACY_TOO_LONG Too many privacy rules were specified, the current limit is 1000.
+PRIVACY_VALUE_INVALID The specified privacy rule combination is invalid.
+PUBLIC_CHANNEL_MISSING You can only export group call invite links for public chats or channels.
+PUBLIC_KEY_REQUIRED A public key is required.
+QUERY_ID_EMPTY The query ID is empty.
+QUERY_ID_INVALID The query ID is invalid.
+QUERY_TOO_SHORT The query string is too short.
+QUIZ_ANSWER_MISSING You can forward a quiz while hiding the original author only after choosing an option in the quiz.
+QUIZ_CORRECT_ANSWERS_EMPTY No correct quiz answer was specified.
+QUIZ_CORRECT_ANSWERS_TOO_MUCH You specified too many correct answers in a quiz, quizzes can only have one right answer!
+QUIZ_CORRECT_ANSWER_INVALID An invalid value was provided to the correct_answers field.
+QUIZ_MULTIPLE_INVALID Quizzes can't have the multiple_choice flag set!
+RANDOM_ID_DUPLICATE You provided a random ID that was already used.
+RANDOM_ID_EMPTY Random ID empty.
+RANDOM_ID_INVALID A provided random ID is invalid.
+RANDOM_LENGTH_INVALID Random length invalid.
+RANGES_INVALID Invalid range provided.
+REACTIONS_TOO_MANY The message already has exactly `reactions_uniq_max` reaction emojis, you can't react with a new emoji, see [the docs for more info »](/api/config#client-configuration).
+REACTION_EMPTY Empty reaction provided.
+REACTION_INVALID The specified reaction is invalid.
+REPLY_MARKUP_BUY_EMPTY Reply markup for buy button empty.
+REPLY_MARKUP_INVALID The provided reply markup is invalid.
+REPLY_MARKUP_TOO_LONG The specified reply_markup is too long.
+REPLY_MESSAGE_ID_INVALID The specified reply-to message ID is invalid.
+REPLY_TO_INVALID The specified `reply_to` field is invalid.
+REPLY_TO_USER_INVALID The replied-to user is invalid.
+RESET_REQUEST_MISSING No password reset is in progress.
+RESULTS_TOO_MUCH Too many results were provided.
+RESULT_ID_DUPLICATE You provided a duplicate result ID.
+RESULT_ID_EMPTY Result ID empty.
+RESULT_ID_INVALID One of the specified result IDs is invalid.
+RESULT_TYPE_INVALID Result type invalid.
+REVOTE_NOT_ALLOWED You cannot change your vote.
+RIGHTS_NOT_MODIFIED The new admin rights are equal to the old rights, no change was made.
+RIGHT_FORBIDDEN Your admin rights do not allow you to do this.
+RSA_DECRYPT_FAILED Internal RSA decryption failed.
+SCHEDULE_BOT_NOT_ALLOWED Bots cannot schedule messages.
+SCHEDULE_DATE_INVALID Invalid schedule date provided.
+SCHEDULE_DATE_TOO_LATE You can't schedule a message this far in the future.
+SCHEDULE_STATUS_PRIVATE Can't schedule until user is online, if the user's last seen timestamp is hidden by their privacy settings.
+SCHEDULE_TOO_MUCH There are too many scheduled messages.
+SCORE_INVALID The specified game score is invalid.
+SEARCH_QUERY_EMPTY The search query is empty.
+SEARCH_WITH_LINK_NOT_SUPPORTED You cannot provide a search query and an invite link at the same time.
+SECONDS_INVALID Invalid duration provided.
+SEND_AS_PEER_INVALID You can't send messages as the specified peer.
+SEND_CODE_UNAVAILABLE Returned when all available options for this type of number were already used (e.g. flash-call, then SMS, then this error might be returned to trigger a second resend).
+SEND_MEDIA_INVALID The specified media is invalid.
+SEND_MESSAGE_MEDIA_INVALID Invalid media provided.
+SEND_MESSAGE_TYPE_INVALID The message type is invalid.
+SENSITIVE_CHANGE_FORBIDDEN You can't change your sensitive content settings.
+SESSION_TOO_FRESH_X This session was created less than 24 hours ago, try again in {value} seconds.
+SETTINGS_INVALID Invalid settings were provided.
+SHA256_HASH_INVALID The provided SHA256 hash is invalid.
+SHORT_NAME_INVALID The specified short name is invalid.
+SHORT_NAME_OCCUPIED The specified short name is already in use.
+SIGN_IN_FAILED Failure while signing in.
+SLOTS_EMPTY The specified slot list is empty.
+SLOWMODE_MULTI_MSGS_DISABLED Slowmode is enabled, you cannot forward multiple messages to this group.
+SLOWMODE_WAIT_X Slowmode is enabled in this chat: wait {value} seconds before sending another message to this chat.
+SLUG_INVALID The specified invoice slug is invalid.
+SMS_CODE_CREATE_FAILED An error occurred while creating the SMS code.
+SRP_ID_INVALID Invalid SRP ID provided.
+SRP_PASSWORD_CHANGED Password has changed.
+START_PARAM_EMPTY The start parameter is empty.
+START_PARAM_INVALID Start parameter invalid.
+START_PARAM_TOO_LONG Start parameter is too long.
+STICKERPACK_STICKERS_TOO_MUCH There are too many stickers in this stickerpack, you can't add any more.
+STICKERSET_INVALID The provided sticker set is invalid.
+STICKERSET_OWNER_ANONYMOUS Provided stickerset can't be installed as group stickerset to prevent admin deanonymization.
+STICKERS_EMPTY No sticker provided.
+STICKERS_TOO_MUCH There are too many stickers in this stickerpack, you can't add any more.
+STICKER_DOCUMENT_INVALID The specified sticker document is invalid.
+STICKER_EMOJI_INVALID Sticker emoji invalid.
+STICKER_FILE_INVALID Sticker file invalid.
+STICKER_GIF_DIMENSIONS The specified video sticker has invalid dimensions.
+STICKER_ID_INVALID The provided sticker ID is invalid.
+STICKER_INVALID The provided sticker is invalid.
+STICKER_MIME_INVALID The specified sticker MIME type is invalid.
+STICKER_PNG_DIMENSIONS Sticker png dimensions invalid.
+STICKER_PNG_NOPNG One of the specified stickers is not a valid PNG file.
+STICKER_TGS_NODOC You must send the animated sticker as a document.
+STICKER_TGS_NOTGS Invalid TGS sticker provided.
+STICKER_THUMB_PNG_NOPNG Incorrect stickerset thumb file provided, PNG / WEBP expected.
+STICKER_THUMB_TGS_NOTGS Incorrect stickerset TGS thumb file provided.
+STICKER_VIDEO_BIG The specified video sticker is too big.
+STICKER_VIDEO_NODOC You must send the video sticker as a document.
+STICKER_VIDEO_NOWEBM The specified video sticker is not in webm format.
+STORIES_NEVER_CREATED This peer hasn't ever posted any stories.
+STORIES_TOO_MUCH You have hit the maximum active stories limit as specified by the [`story_expiring_limit_*` client configuration parameters](https://core.telegram.org/api/config#story-expiring-limit-default): you should buy a [Premium](/api/premium) subscription, delete an active story, or wait for the oldest story to expire.
+STORY_ID_EMPTY You specified no story IDs.
+STORY_ID_INVALID The specified story ID is invalid.
+STORY_NOT_MODIFIED The new story information you passed is equal to the previous story information, thus it wasn't modified.
+STORY_PERIOD_INVALID The specified story period is invalid for this account.
+STORY_SEND_FLOOD_MONTHLY_X You've hit the monthly story limit as specified by the [`stories_sent_monthly_limit_*` client configuration parameters](https://core.telegram.org/api/config#stories-sent-monthly-limit-default): wait for the specified number of seconds before posting a new story.
+STORY_SEND_FLOOD_WEEKLY_X You've hit the weekly story limit as specified by the [`stories_sent_weekly_limit_*` client configuration parameters](https://core.telegram.org/api/config#stories-sent-weekly-limit-default): wait for the specified number of seconds before posting a new story.
+SWITCH_PM_TEXT_EMPTY The switch_pm.text field was empty.
+TAKEOUT_INIT_DELAY_X Sorry, for security reasons, you will be able to begin downloading your data in {value} seconds. We have notified all your devices about the export request to make sure it's authorized and to give you time to react if it's not.
+TAKEOUT_INVALID The specified takeout ID is invalid.
+TAKEOUT_REQUIRED A [takeout](https://core.telegram.org/api/takeout) session needs to be initialized first, [see here » for more info](/api/takeout).
+TASK_ALREADY_EXISTS An email reset was already requested.
+TEMP_AUTH_KEY_ALREADY_BOUND The passed temporary key is already bound to another **perm_auth_key_id**.
+TEMP_AUTH_KEY_EMPTY No temporary auth key provided.
+THEME_FILE_INVALID Invalid theme file provided.
+THEME_FORMAT_INVALID Invalid theme format provided.
+THEME_INVALID Invalid theme provided.
+THEME_MIME_INVALID The theme's MIME type is invalid.
+THEME_TITLE_INVALID The specified theme title is invalid.
+TITLE_INVALID The specified stickerpack title is invalid.
+TMP_PASSWORD_DISABLED The temporary password is disabled.
+TOKEN_EMPTY The specified token is empty.
+TOKEN_INVALID The provided token is invalid.
+TOKEN_TYPE_INVALID The specified token type is invalid.
+TOPICS_EMPTY You specified no topic IDs.
+TOPIC_CLOSED This topic was closed, you can't send messages to it anymore.
+TOPIC_CLOSE_SEPARATELY The `close` flag cannot be provided together with any of the other flags.
+TOPIC_DELETED The specified topic was deleted.
+TOPIC_HIDE_SEPARATELY The `hide` flag cannot be provided together with any of the other flags.
+TOPIC_ID_INVALID The specified topic ID is invalid.
+TOPIC_NOT_MODIFIED The updated topic info is equal to the current topic info, nothing was changed.
+TOPIC_TITLE_EMPTY The specified topic title is empty.
+TO_LANG_INVALID The specified destination language is invalid.
+TRANSCRIPTION_FAILED Audio transcription failed.
+TTL_DAYS_INVALID The provided TTL is invalid.
+TTL_MEDIA_INVALID Invalid media Time To Live was provided.
+TTL_PERIOD_INVALID The specified TTL period is invalid.
+TYPES_EMPTY No top peer type was provided.
+UNTIL_DATE_INVALID Invalid until date provided.
+URL_INVALID Invalid URL provided.
+USAGE_LIMIT_INVALID The specified usage limit is invalid.
+USERNAMES_ACTIVE_TOO_MUCH The maximum number of active usernames was reached.
+USERNAME_INVALID The provided username is not valid.
+USERNAME_NOT_MODIFIED The username was not modified.
+USERNAME_NOT_OCCUPIED The provided username is not occupied.
+USERNAME_OCCUPIED The provided username is already occupied.
+USERNAME_PURCHASE_AVAILABLE The specified username can be purchased on https://fragment.com.
+USERPIC_PRIVACY_REQUIRED You need to disable privacy settings for your profile picture in order to make your geolocation public.
+USERPIC_UPLOAD_REQUIRED You must have a profile picture to publish your geolocation.
+USERS_TOO_FEW Not enough users (to create a chat, for example).
+USERS_TOO_MUCH The maximum number of users has been exceeded (to create a chat, for example).
+USER_ADMIN_INVALID You're not an admin.
+USER_ALREADY_INVITED You have already invited this user.
+USER_ALREADY_PARTICIPANT The user is already in the group.
+USER_BANNED_IN_CHANNEL You're banned from sending messages in supergroups/channels.
+USER_BLOCKED User blocked.
+USER_BOT Bots can only be admins in channels.
+USER_BOT_INVALID User accounts must provide the `bot` method parameter when calling this method. If there is no such method parameter, this method can only be invoked by bot accounts.
+USER_BOT_REQUIRED This method can only be called by a bot.
+USER_CHANNELS_TOO_MUCH One of the users you tried to add is already in too many channels/supergroups.
+USER_CREATOR You can't leave this channel, because you're its creator.
+USER_DELETED You can't send this secret message because the other participant deleted their account.
+USER_ID_INVALID The provided user ID is invalid.
+USER_INVALID Invalid user provided.
+USER_IS_BLOCKED You were blocked by this user.
+USER_IS_BOT Bots can't send messages to other bots.
+USER_KICKED This user was kicked from this supergroup/channel.
+USER_NOT_MUTUAL_CONTACT The provided user is not a mutual contact.
+USER_NOT_PARTICIPANT You're not a member of this supergroup/channel.
+USER_PRIVACY_RESTRICTED The user's privacy settings do not allow you to do this.
+USER_PUBLIC_MISSING Cannot generate a link to stories posted by a peer without a username.
+USER_RESTRICTED You're spamreported, you can't create channels or chats.
+USER_VOLUME_INVALID The specified user volume is invalid.
+VENUE_ID_INVALID The specified venue ID is invalid.
+VIDEO_CONTENT_TYPE_INVALID The video's content type is invalid.
+VIDEO_FILE_INVALID The specified video file is invalid.
+VIDEO_TITLE_EMPTY The specified video title is empty.
+VOICE_MESSAGES_FORBIDDEN This user's privacy settings forbid you from sending voice messages.
+WALLPAPER_FILE_INVALID The specified wallpaper file is invalid.
+WALLPAPER_INVALID The specified wallpaper is invalid.
+WALLPAPER_MIME_INVALID The specified wallpaper MIME type is invalid.
+WALLPAPER_NOT_FOUND The specified wallpaper could not be found.
+WC_CONVERT_URL_INVALID WC convert URL invalid.
+WEBDOCUMENT_INVALID Invalid webdocument URL provided.
+WEBDOCUMENT_MIME_INVALID Invalid webdocument mime type provided.
+WEBDOCUMENT_SIZE_TOO_BIG Webdocument is too big!
+WEBDOCUMENT_URL_INVALID The specified webdocument URL is invalid.
+WEBPAGE_CURL_FAILED Failure while fetching the webpage with cURL.
+WEBPAGE_MEDIA_EMPTY Webpage media empty.
+WEBPAGE_NOT_FOUND A preview for the specified webpage `url` could not be generated.
+WEBPAGE_URL_INVALID The specified webpage `url` is invalid.
+WEBPUSH_AUTH_INVALID The specified web push authentication secret is invalid.
+WEBPUSH_KEY_INVALID The specified web push elliptic curve Diffie-Hellman public key is invalid.
+WEBPUSH_TOKEN_INVALID The specified web push token is invalid.
+YOU_BLOCKED_USER You blocked this user.
\ No newline at end of file
diff --git a/compiler/errors/source/500_INTERNAL_SERVER_ERROR.tsv b/compiler/errors/source/500_INTERNAL_SERVER_ERROR.tsv
index ca821810..269c3066 100644
--- a/compiler/errors/source/500_INTERNAL_SERVER_ERROR.tsv
+++ b/compiler/errors/source/500_INTERNAL_SERVER_ERROR.tsv
@@ -1,47 +1,552 @@
id message
+2FA_CONFIRM_WAIT_X Since this account is active and protected by a 2FA password, we will delete it in 1 week for security purposes. You can cancel this process at any time, you'll be able to reset your account in {value} seconds.
+ABOUT_TOO_LONG About string too long.
+ACCESS_TOKEN_EXPIRED Access token expired.
+ACCESS_TOKEN_INVALID Access token invalid.
+ADDRESS_INVALID The specified geopoint address is invalid.
+ADMINS_TOO_MUCH There are too many admins.
+ADMIN_ID_INVALID The specified admin ID is invalid.
+ADMIN_RANK_EMOJI_NOT_ALLOWED An admin rank cannot contain emojis.
+ADMIN_RANK_INVALID The specified admin rank is invalid.
+ADMIN_RIGHTS_EMPTY The chatAdminRights constructor passed in keyboardButtonRequestPeer.peer_type.user_admin_rights has no rights set (i.e. flags is 0).
+ALBUM_PHOTOS_TOO_MANY You have uploaded too many profile photos, delete some before retrying.
+ANONYMOUS_REACTIONS_DISABLED Sorry, anonymous administrators cannot leave reactions or participate in polls.
API_CALL_ERROR API call error due to Telegram having internal problems. Please try again later
-AUTH_RESTART User authorization has restarted
-CALL_OCCUPY_FAILED The call failed because the user is already making another call
-CHAT_ID_GENERATE_FAILED Failure while generating the chat ID due to Telegram having internal problems. Please try again later
+API_ID_INVALID API ID invalid.
+API_ID_PUBLISHED_FLOOD This API id was published somewhere, you can't use it now.
+ARTICLE_TITLE_EMPTY The title of the article is empty.
+AUDIO_CONTENT_URL_EMPTY The remote URL specified in the content field is empty.
+AUDIO_TITLE_EMPTY An empty audio title was provided.
+AUTH_BYTES_INVALID The provided authorization is invalid.
+AUTH_RESTART Restart the authorization process.
+AUTH_TOKEN_ALREADY_ACCEPTED The specified auth token was already accepted.
+AUTH_TOKEN_EXCEPTION An error occurred while importing the auth token.
+AUTH_TOKEN_EXPIRED The authorization token has expired.
+AUTH_TOKEN_INVALID The specified auth token is invalid.
+AUTH_TOKEN_INVALIDX The specified auth token is invalid.
+AUTOARCHIVE_NOT_AVAILABLE The autoarchive setting is not available at this time: please check the value of the [autoarchive_setting_available field in client config »](https://core.telegram.org/api/config#client-configuration) before calling this method.
+BANK_CARD_NUMBER_INVALID The specified card number is invalid.
+BANNED_RIGHTS_INVALID You provided some invalid flags in the banned rights.
+BOOSTS_EMPTY No boost slots were specified.
+BOOSTS_REQUIRED The specified channel must first be [boosted by its users](https://core.telegram.org/api/boost) in order to perform this action.
+BOOST_NOT_MODIFIED You're already [boosting](https://core.telegram.org/api/boost) the specified channel.
+BOOST_PEER_INVALID The specified `boost_peer` is invalid.
+BOTS_TOO_MUCH There are too many bots in this chat/channel.
+BOT_APP_INVALID The specified bot app is invalid.
+BOT_APP_SHORTNAME_INVALID The specified bot app short name is invalid.
+BOT_CHANNELS_NA Bots can't edit admin privileges.
+BOT_COMMAND_DESCRIPTION_INVALID The specified command description is invalid.
+BOT_COMMAND_INVALID The specified command is invalid.
+BOT_DOMAIN_INVALID Bot domain invalid.
+BOT_GROUPS_BLOCKED This bot can't be added to groups.
+BOT_INLINE_DISABLED This bot can't be used in inline mode.
+BOT_INVALID This is not a valid bot.
+BOT_MISSING Only bots can call this method, please use [@stickers](https://t.me/stickers) if you're a user.
+BOT_ONESIDE_NOT_AVAIL Bots can't pin messages in PM just for themselves.
+BOT_PAYMENTS_DISABLED Please enable bot payments in botfather before calling this method.
+BOT_RESPONSE_TIMEOUT A timeout occurred while fetching data from the bot.
+BOT_SCORE_NOT_MODIFIED The score wasn't modified.
+BOT_WEBVIEW_DISABLED A webview cannot be opened in the specified conditions: emitted for example if `from_bot_menu` or `url` are set and `peer` is not the chat with the bot.
+BROADCAST_FORBIDDEN Channel poll voters and reactions cannot be fetched to prevent deanonymization.
+BROADCAST_ID_INVALID Broadcast ID invalid.
+BROADCAST_PUBLIC_VOTERS_FORBIDDEN You can't forward polls with public voters.
+BROADCAST_REQUIRED This method can only be called on a channel, please use stats.getMegagroupStats for supergroups.
+BUTTON_DATA_INVALID The data of one or more of the buttons you provided is invalid.
+BUTTON_TEXT_INVALID The specified button text is invalid.
+BUTTON_TYPE_INVALID The type of one or more of the buttons you provided is invalid.
+BUTTON_URL_INVALID Button URL invalid.
+BUTTON_USER_PRIVACY_RESTRICTED The privacy setting of the user specified in a [inputKeyboardButtonUserProfile](/constructor/inputKeyboardButtonUserProfile) button do not allow creating such a button.
+CALL_ALREADY_ACCEPTED The call was already accepted.
+CALL_ALREADY_DECLINED The call was already declined.
+CALL_OCCUPY_FAILED The call failed because the user is already making another call.
+CALL_PEER_INVALID The provided call peer object is invalid.
+CALL_PROTOCOL_FLAGS_INVALID Call protocol flags invalid.
+CDN_METHOD_INVALID You can't call this method in a CDN DC.
+CDN_UPLOAD_TIMEOUT A server-side timeout occurred while reuploading the file to the CDN DC.
+CHANNELS_ADMIN_LOCATED_TOO_MUCH The user has reached the limit of public geogroups.
+CHANNELS_ADMIN_PUBLIC_TOO_MUCH You're admin of too many public channels, make some channels private to change the username of this channel.
+CHANNELS_TOO_MUCH You have joined too many channels/supergroups.
+CHANNEL_FORUM_MISSING This supergroup is not a forum.
+CHANNEL_ID_INVALID The specified supergroup ID is invalid.
+CHANNEL_INVALID The provided channel is invalid.
+CHANNEL_PARICIPANT_MISSING The current user is not in the channel.
+CHANNEL_PRIVATE You haven't joined this channel/supergroup.
+CHANNEL_PUBLIC_GROUP_NA channel/supergroup not available.
+CHANNEL_TOO_BIG This channel has too many participants (>1000) to be deleted.
+CHANNEL_TOO_LARGE Channel is too large to be deleted; this error is issued when trying to delete channels with more than 1000 members (subject to change).
+CHATLIST_EXCLUDE_INVALID The specified `exclude_peers` are invalid.
+CHAT_ABOUT_NOT_MODIFIED About text has not changed.
+CHAT_ABOUT_TOO_LONG Chat about too long.
+CHAT_ADMIN_INVITE_REQUIRED You do not have the rights to do this.
+CHAT_ADMIN_REQUIRED You must be an admin in this chat to do this.
+CHAT_DISCUSSION_UNALLOWED You can't enable forum topics in a discussion group linked to a channel.
+CHAT_FORWARDS_RESTRICTED You can't forward messages from a protected chat.
+CHAT_GUEST_SEND_FORBIDDEN You join the discussion group before commenting, see [here »](/api/discussion#requiring-users-to-join-the-group) for more info.
+CHAT_ID_EMPTY The provided chat ID is empty.
+CHAT_ID_GENERATE_FAILED Failure while generating the chat ID.
+CHAT_ID_INVALID The provided chat id is invalid.
+CHAT_INVALID Invalid chat.
+CHAT_INVITE_PERMANENT You can't set an expiration date on permanent invite links.
+CHAT_LINK_EXISTS The chat is public, you can't hide the history to new users.
+CHAT_NOT_MODIFIED No changes were made to chat information because the new information you passed is identical to the current information.
CHAT_OCCUPY_LOC_FAILED An internal error occurred while creating the chat
CHAT_OCCUPY_USERNAME_FAILED Failure to occupy chat username due to Telegram having internal problems. Please try again later
+CHAT_PUBLIC_REQUIRED You can only enable join requests in public groups.
+CHAT_RESTRICTED You can't send messages in this chat, you were restricted.
+CHAT_REVOKE_DATE_UNSUPPORTED `min_date` and `max_date` are not available for using with non-user peers.
+CHAT_SEND_AUDIOS_FORBIDDEN You can't send audio messages in this chat.
+CHAT_SEND_DOCS_FORBIDDEN You can't send documents in this chat.
+CHAT_SEND_GAME_FORBIDDEN You can't send a game to this chat.
+CHAT_SEND_GIFS_FORBIDDEN You can't send gifs in this chat.
+CHAT_SEND_INLINE_FORBIDDEN You can't send inline messages in this group.
+CHAT_SEND_MEDIA_FORBIDDEN You can't send media in this chat.
+CHAT_SEND_PHOTOS_FORBIDDEN You can't send photos in this chat.
+CHAT_SEND_PLAIN_FORBIDDEN You can't send non-media (text) messages in this chat.
+CHAT_SEND_POLL_FORBIDDEN You can't send polls in this chat.
+CHAT_SEND_STICKERS_FORBIDDEN You can't send stickers in this chat.
+CHAT_SEND_VIDEOS_FORBIDDEN You can't send videos in this chat.
+CHAT_SEND_VOICES_FORBIDDEN You can't send voice recordings in this chat.
+CHAT_TITLE_EMPTY No chat title provided.
+CHAT_TOO_BIG This method is not available for groups with more than `chat_read_mark_size_threshold` members, [see client configuration »](https://core.telegram.org/api/config#client-configuration).
+CHAT_WRITE_FORBIDDEN You can't write in this chat.
CHP_CALL_FAIL Telegram is having internal problems. Please try again later
+CODE_EMPTY The provided code is empty.
+CODE_HASH_INVALID Code hash invalid.
+CODE_INVALID Code invalid.
+COLOR_INVALID The specified color palette ID was invalid.
+CONNECTION_API_ID_INVALID The provided API id is invalid.
+CONNECTION_APP_VERSION_EMPTY App version is empty.
+CONNECTION_LAYER_INVALID Layer invalid.
+CONTACT_ADD_MISSING Contact to add is missing.
+CONTACT_ID_INVALID The provided contact ID is invalid.
+CONTACT_MISSING The specified user is not a contact.
+CONTACT_NAME_EMPTY Contact name empty.
+CONTACT_REQ_MISSING Missing contact request.
+CREATE_CALL_FAILED An error occurred while creating the call.
+CURRENCY_TOTAL_AMOUNT_INVALID The total amount of all prices is invalid.
+CUSTOM_REACTIONS_TOO_MANY Too many custom reactions were specified.
+DATA_INVALID Encrypted data invalid.
+DATA_JSON_INVALID The provided JSON data is invalid.
+DATA_TOO_LONG Data too long.
+DATE_EMPTY Date empty.
+DC_ID_INVALID The provided DC ID is invalid.
+DH_G_A_INVALID g_a invalid.
+DOCUMENT_INVALID The specified document is invalid.
+EDIT_BOT_INVITE_FORBIDDEN Normal users can't edit invites that were created by bots.
+EMAIL_HASH_EXPIRED Email hash expired.
+EMAIL_INVALID The specified email is invalid.
+EMAIL_NOT_SETUP In order to change the login email with emailVerifyPurposeLoginChange, an existing login email must already be set using emailVerifyPurposeLoginSetup.
+EMAIL_UNCONFIRMED Email unconfirmed.
+EMAIL_UNCONFIRMED_X The provided email isn't confirmed, {value} is the length of the verification code that was just sent to the email: use [account.verifyEmail](https://core.telegram.org/method/account.verifyEmail) to enter the received verification code and enable the recovery email.
+EMAIL_VERIFY_EXPIRED The verification email has expired.
+EMOJI_INVALID The specified theme emoji is valid.
+EMOJI_MARKUP_INVALID The specified `video_emoji_markup` was invalid.
+EMOJI_NOT_MODIFIED The theme wasn't changed.
+EMOTICON_EMPTY The emoji is empty.
+EMOTICON_INVALID The specified emoji is invalid.
+EMOTICON_STICKERPACK_MISSING inputStickerSetDice.emoji cannot be empty.
+ENCRYPTED_MESSAGE_INVALID Encrypted message invalid.
+ENCRYPTION_ALREADY_ACCEPTED Secret chat already accepted.
+ENCRYPTION_ALREADY_DECLINED The secret chat was already declined.
+ENCRYPTION_DECLINED The secret chat was declined.
+ENCRYPTION_ID_INVALID The provided secret chat ID is invalid.
ENCRYPTION_OCCUPY_ADMIN_FAILED Failed occupying memory for admin info due to Telegram having internal problems. Please try again later
ENCRYPTION_OCCUPY_FAILED Internal server error while accepting secret chat
+ENTITIES_TOO_LONG You provided too many styled message entities.
+ENTITY_BOUNDS_INVALID A specified [entity offset or length](/api/entities#entity-length) is invalid, see [here »](/api/entities#entity-length) for info on how to properly compute the entity offset/length.
+ENTITY_MENTION_USER_INVALID You mentioned an invalid user.
+ERROR_TEXT_EMPTY The provided error message is empty.
+EXPIRE_DATE_INVALID The specified expiration date is invalid.
+EXPORT_CARD_INVALID Provided card is invalid.
+EXTERNAL_URL_INVALID External URL invalid.
+FILE_CONTENT_TYPE_INVALID File content-type is invalid.
+FILE_EMTPY An empty file was provided.
+FILE_ID_INVALID The provided file id is invalid.
+FILE_PARTS_INVALID The number of file parts is invalid.
+FILE_PART_EMPTY The provided file part is empty.
+FILE_PART_INVALID The file part number is invalid.
+FILE_PART_LENGTH_INVALID The length of a file part is invalid.
+FILE_PART_SIZE_CHANGED Provided file part size has changed.
+FILE_PART_SIZE_INVALID The provided file part size is invalid.
+FILE_PART_TOO_BIG The uploaded file part is too big.
+FILE_REFERENCE_EMPTY An empty [file reference](https://core.telegram.org/api/file_reference) was specified.
+FILE_REFERENCE_EXPIRED File reference expired, it must be refetched as described in [the documentation](https://core.telegram.org/api/file_reference).
+FILE_REFERENCE_INVALID The specified [file reference](https://core.telegram.org/api/file_reference) is invalid.
+FILE_TITLE_EMPTY An empty file title was specified.
+FILE_TOKEN_INVALID The specified file token is invalid.
+FILTER_ID_INVALID The specified filter ID is invalid.
+FILTER_INCLUDE_EMPTY The include_peers vector of the filter is empty.
+FILTER_NOT_SUPPORTED The specified filter cannot be used in this context.
+FILTER_TITLE_EMPTY The title field of the filter is empty.
+FIRSTNAME_INVALID The first name is invalid.
FOLDER_DEAC_AUTOFIX_ALL Telegram is having internal problems. Please try again later
+FOLDER_ID_EMPTY An empty folder ID was specified.
+FOLDER_ID_INVALID Invalid folder ID.
+FORUM_ENABLED You can't execute the specified action because the group is a [forum](https://core.telegram.org/api/forum), disable forum functionality to continue.
+FRESH_CHANGE_ADMINS_FORBIDDEN You were just elected admin, you can't add or modify other admins yet.
+FROM_MESSAGE_BOT_DISABLED Bots can't use fromMessage min constructors.
+FROM_PEER_INVALID The specified from_id is invalid.
+GAME_BOT_INVALID Bots can't send another bot's game.
+GENERAL_MODIFY_ICON_FORBIDDEN You can't modify the icon of the "General" topic.
+GEO_POINT_INVALID Invalid geoposition provided.
+GIFT_SLUG_EXPIRED The specified gift slug has expired.
+GIFT_SLUG_INVALID The specified slug is invalid.
+GIF_CONTENT_TYPE_INVALID GIF content-type invalid.
+GIF_ID_INVALID The provided GIF ID is invalid.
+GRAPH_EXPIRED_RELOAD This graph has expired, please obtain a new graph token.
+GRAPH_INVALID_RELOAD Invalid graph token provided, please reload the stats and provide the updated token.
+GRAPH_OUTDATED_RELOAD The graph is outdated, please get a new async token using stats.getBroadcastStats.
GROUPCALL_ADD_PARTICIPANTS_FAILED Failure while adding voice chat member due to Telegram having internal problems. Please try again later
+GROUPCALL_ALREADY_DISCARDED The group call was already discarded.
+GROUPCALL_ALREADY_STARTED The groupcall has already started, you can join directly using [phone.joinGroupCall](https://core.telegram.org/method/phone.joinGroupCall).
+GROUPCALL_FORBIDDEN The group call has already ended.
+GROUPCALL_INVALID The specified group call is invalid.
+GROUPCALL_JOIN_MISSING You haven't joined this group call.
+GROUPCALL_NOT_MODIFIED Group call settings weren't modified.
+GROUPCALL_SSRC_DUPLICATE_MUCH The app needs to retry joining the group call with a new SSRC value.
GROUPED_ID_OCCUPY_FAILED Telegram is having internal problems. Please try again later
+GROUPED_MEDIA_INVALID Invalid grouped media.
+HASH_INVALID The provided hash is invalid.
+HIDE_REQUESTER_MISSING The join request was missing or was already handled.
HISTORY_GET_FAILED The chat history couldn't be retrieved due to Telegram having internal problems. Please try again later
IMAGE_ENGINE_DOWN Image engine down due to Telegram having internal problems. Please try again later
+IMAGE_PROCESS_FAILED Failure while processing image.
+IMPORT_FILE_INVALID The specified chat export file is invalid.
+IMPORT_FORMAT_UNRECOGNIZED The specified chat export file was exported from an unsupported chat app.
+IMPORT_ID_INVALID The specified import ID is invalid.
+IMPORT_TOKEN_INVALID The specified token is invalid.
+INLINE_BOT_REQUIRED Only the inline bot can edit message.
+INLINE_RESULT_EXPIRED The inline query expired.
+INPUT_CHATLIST_INVALID The specified folder is invalid.
+INPUT_FILTER_INVALID The specified filter is invalid.
+INPUT_TEXT_EMPTY The specified text is empty.
+INPUT_TEXT_TOO_LONG The specified text is too long.
+INPUT_USER_DEACTIVATED The specified user was deleted.
INTERDC_X_CALL_ERROR An error occurred while Telegram was intercommunicating with DC{value}. Please try again later
INTERDC_X_CALL_RICH_ERROR A rich error occurred while Telegram was intercommunicating with DC{value}. Please try again later
+INVITES_TOO_MUCH The maximum number of per-folder invites specified by the `chatlist_invites_limit_default`/`chatlist_invites_limit_premium` [client configuration parameters »](/api/config#chatlist-invites-limit-default) was reached.
+INVITE_FORBIDDEN_WITH_JOINAS If the user has anonymously joined a group call as a channel, they can't invite other users to the group call because that would cause deanonymization, because the invite would be sent using the original user ID, not the anonymized channel ID.
+INVITE_HASH_EMPTY The invite hash is empty.
+INVITE_HASH_EXPIRED The invite link has expired.
+INVITE_HASH_INVALID The invite hash is invalid.
+INVITE_REQUEST_SENT You have successfully requested to join this chat or channel.
+INVITE_REVOKED_MISSING The specified invite link was already revoked or is invalid.
+INVITE_SLUG_EMPTY The specified invite slug is empty.
+INVITE_SLUG_EXPIRED The specified chat folder link has expired.
+INVOICE_PAYLOAD_INVALID The specified invoice payload is invalid.
+JOIN_AS_PEER_INVALID The specified peer cannot be used to join a group call.
+LANG_CODE_INVALID The specified language code is invalid.
+LANG_CODE_NOT_SUPPORTED The specified language code is not supported.
+LANG_PACK_INVALID The provided language pack is invalid.
+LASTNAME_INVALID The last name is invalid.
+LIMIT_INVALID The provided limit is invalid.
+LINK_NOT_MODIFIED Discussion link not modified.
+LOCATION_INVALID The provided location is invalid.
+MAX_DATE_INVALID The specified maximum date is invalid.
+MAX_ID_INVALID The provided max ID is invalid.
+MAX_QTS_INVALID The specified max_qts is invalid.
+MD5_CHECKSUM_INVALID The MD5 checksums do not match.
+MEDIA_CAPTION_TOO_LONG The caption is too long.
+MEDIA_EMPTY The provided media object is invalid.
+MEDIA_FILE_INVALID The specified media file is invalid.
+MEDIA_GROUPED_INVALID You tried to send media of different types in an album.
+MEDIA_INVALID Media invalid.
+MEDIA_NEW_INVALID The new media is invalid.
+MEDIA_PREV_INVALID Previous media invalid.
+MEDIA_TTL_INVALID The specified media TTL is invalid.
+MEDIA_TYPE_INVALID The specified media type cannot be used in stories.
+MEDIA_VIDEO_STORY_MISSING
+MEGAGROUP_GEO_REQUIRED This method can only be invoked on a geogroup.
+MEGAGROUP_ID_INVALID Invalid supergroup ID.
+MEGAGROUP_PREHISTORY_HIDDEN Group with hidden history for new members can't be set as discussion groups.
+MEGAGROUP_REQUIRED You can only use this method on a supergroup.
MEMBER_FETCH_FAILED Telegram is having internal problems. Please try again later
MEMBER_NO_LOCATION Couldn't find the member's location due to Telegram having internal problems. Please try again later
MEMBER_OCCUPY_PRIMARY_LOC_FAILED Telegram is having internal problems. Please try again later
MEMBER_OCCUPY_USERNAME_FAILED Failure to occupy member username due to Telegram having internal problems. Please try again later
+MESSAGE_AUTHOR_REQUIRED Message author required.
+MESSAGE_DELETE_FORBIDDEN You can't delete one of the messages you tried to delete, most likely because it is a service message.
+MESSAGE_EDIT_TIME_EXPIRED You can't edit this message anymore, too much time has passed since its creation.
+MESSAGE_EMPTY The provided message is empty.
+MESSAGE_IDS_EMPTY No message ids were provided.
+MESSAGE_ID_INVALID The provided message id is invalid.
+MESSAGE_NOT_MODIFIED The provided message data is identical to the previous message data, the message wasn't modified.
+MESSAGE_POLL_CLOSED Poll closed.
+MESSAGE_TOO_LONG The provided message is too long.
+METHOD_INVALID The specified method is invalid.
+MIN_DATE_INVALID The specified minimum date is invalid.
MSGID_DECREASE_RETRY Telegram is having internal problems. Please try again later
+MSG_ID_INVALID Invalid message ID provided.
MSG_RANGE_UNSYNC Message range unsynchronized due to Telegram having internal problems. Please try again later
+MSG_TOO_OLD [`chat_read_mark_expire_period` seconds](https://core.telegram.org/api/config#chat-read-mark-expire-period) have passed since the message was sent, read receipts were deleted.
+MSG_WAIT_FAILED A waiting call returned an error.
MT_SEND_QUEUE_TOO_LONG The MTProto send queue has grown too much due to Telegram having internal problems. Please try again later
+MULTI_MEDIA_TOO_LONG Too many media files for album.
NEED_CHAT_INVALID The provided chat is invalid
NEED_MEMBER_INVALID The provided member is invalid or does not exist
+NEW_SALT_INVALID The new salt is invalid.
+NEW_SETTINGS_EMPTY No password is set on the current account, and no new password was specified in `new_settings`.
+NEW_SETTINGS_INVALID The new password settings are invalid.
+NEXT_OFFSET_INVALID The specified offset is longer than 64 bytes.
No workers running The Telegram server is restarting its workers. Try again later.
+OFFSET_INVALID The provided offset is invalid.
+OFFSET_PEER_ID_INVALID The provided offset peer is invalid.
+OPTIONS_TOO_MUCH Too many options provided.
+OPTION_INVALID Invalid option selected.
+ORDER_INVALID The specified username order is invalid.
+PACK_SHORT_NAME_INVALID Short pack name invalid.
+PACK_SHORT_NAME_OCCUPIED A stickerpack with this name already exists.
+PACK_TITLE_INVALID The stickerpack title is invalid.
+PARTICIPANTS_TOO_FEW Not enough participants.
PARTICIPANT_CALL_FAILED Failure while making call due to Telegram having internal problems. Please try again later
-PERSISTENT_TIMESTAMP_OUTDATED The persistent timestamp is outdated due to Telegram having internal problems. Please try again later
+PARTICIPANT_ID_INVALID The specified participant ID is invalid.
+PARTICIPANT_JOIN_MISSING Trying to enable a presentation, when the user hasn't joined the Video Chat with [phone.joinGroupCall](https://core.telegram.org/method/phone.joinGroupCall).
+PARTICIPANT_VERSION_OUTDATED The other participant does not use an up to date telegram client with support for calls.
+PASSWORD_EMPTY The provided password is empty.
+PASSWORD_HASH_INVALID The provided password hash is invalid.
+PASSWORD_MISSING You must enable 2FA in order to transfer ownership of a channel.
+PASSWORD_RECOVERY_EXPIRED The recovery code has expired.
+PASSWORD_RECOVERY_NA No email was set, can't recover password via email.
+PASSWORD_REQUIRED A [2FA password](https://core.telegram.org/api/srp) must be configured to use Telegram Passport.
+PASSWORD_TOO_FRESH_X The password was modified less than 24 hours ago, try again in {value} seconds.
+PAYMENT_PROVIDER_INVALID The specified payment provider is invalid.
+PEERS_LIST_EMPTY The specified list of peers is empty.
+PEER_HISTORY_EMPTY You can't pin an empty chat with a user.
+PEER_ID_INVALID The provided peer id is invalid.
+PEER_ID_NOT_SUPPORTED The provided peer ID is not supported.
+PERSISTENT_TIMESTAMP_EMPTY Persistent timestamp empty.
+PERSISTENT_TIMESTAMP_INVALID Persistent timestamp invalid.
+PERSISTENT_TIMESTAMP_OUTDATED Channel internal replication issues, try again later (treat this like an RPC_CALL_FAIL).
+PHONE_CODE_EMPTY phone_code is missing.
+PHONE_CODE_EXPIRED The phone code you provided has expired.
+PHONE_CODE_HASH_EMPTY phone_code_hash is missing.
+PHONE_CODE_INVALID The provided phone code is invalid.
+PHONE_HASH_EXPIRED An invalid or expired `phone_code_hash` was provided.
+PHONE_NOT_OCCUPIED No user is associated to the specified phone number.
+PHONE_NUMBER_APP_SIGNUP_FORBIDDEN You can't sign up using this app.
+PHONE_NUMBER_BANNED The provided phone number is banned from telegram.
+PHONE_NUMBER_FLOOD You asked for the code too many times.
+PHONE_NUMBER_INVALID The phone number is invalid.
+PHONE_NUMBER_OCCUPIED The phone number is already in use.
+PHONE_NUMBER_UNOCCUPIED The phone number is not yet being used.
+PHONE_PASSWORD_PROTECTED This phone is password protected.
+PHOTO_CONTENT_TYPE_INVALID Photo mime-type invalid.
+PHOTO_CONTENT_URL_EMPTY Photo URL invalid.
PHOTO_CREATE_FAILED The creation of the photo failed due to Telegram having internal problems. Please try again later
+PHOTO_CROP_FILE_MISSING Photo crop file missing.
+PHOTO_CROP_SIZE_SMALL Photo is too small.
+PHOTO_EXT_INVALID The extension of the photo is invalid.
+PHOTO_FILE_MISSING Profile photo file missing.
+PHOTO_ID_INVALID Photo ID invalid.
+PHOTO_INVALID Photo invalid.
+PHOTO_INVALID_DIMENSIONS The photo dimensions are invalid.
+PHOTO_SAVE_FILE_INVALID Internal issues, try again later.
+PHOTO_THUMB_URL_EMPTY Photo thumbnail URL is empty.
+PINNED_DIALOGS_TOO_MUCH Too many pinned dialogs.
+PIN_RESTRICTED You can't pin messages.
+POLL_ANSWERS_INVALID Invalid poll answers were provided.
+POLL_ANSWER_INVALID One of the poll answers is not acceptable.
+POLL_OPTION_DUPLICATE Duplicate poll options provided.
+POLL_OPTION_INVALID Invalid poll option provided.
+POLL_QUESTION_INVALID One of the poll questions is not acceptable.
+POLL_VOTE_REQUIRED Cast a vote in the poll before calling this method.
POSTPONED_TIMEOUT Telegram is having internal problems. Please try again later
+PREMIUM_ACCOUNT_REQUIRED A premium account is required to execute this action.
+PREMIUM_SUB_ACTIVE_UNTIL_X You already have a premium subscription active until unixtime {value} .
+PRIVACY_KEY_INVALID The privacy key is invalid.
+PRIVACY_PREMIUM_REQUIRED You need a [Telegram Premium subscription](https://core.telegram.org/api/premium) to send a message to this user.
+PRIVACY_TOO_LONG Too many privacy rules were specified, the current limit is 1000.
+PRIVACY_VALUE_INVALID The specified privacy rule combination is invalid.
PTS_CHANGE_EMPTY No PTS change
-RANDOM_ID_DUPLICATE You provided a random ID that was already used
+PUBLIC_CHANNEL_MISSING You can only export group call invite links for public chats or channels.
+PUBLIC_KEY_REQUIRED A public key is required.
+QUERY_ID_EMPTY The query ID is empty.
+QUERY_ID_INVALID The query ID is invalid.
+QUERY_TOO_SHORT The query string is too short.
+QUIZ_ANSWER_MISSING You can forward a quiz while hiding the original author only after choosing an option in the quiz.
+QUIZ_CORRECT_ANSWERS_EMPTY No correct quiz answer was specified.
+QUIZ_CORRECT_ANSWERS_TOO_MUCH You specified too many correct answers in a quiz, quizzes can only have one right answer!
+QUIZ_CORRECT_ANSWER_INVALID An invalid value was provided to the correct_answers field.
+QUIZ_MULTIPLE_INVALID Quizzes can't have the multiple_choice flag set!
+RANDOM_ID_DUPLICATE You provided a random ID that was already used.
+RANDOM_ID_EMPTY Random ID empty.
+RANDOM_ID_INVALID A provided random ID is invalid.
+RANDOM_LENGTH_INVALID Random length invalid.
+RANGES_INVALID Invalid range provided.
+REACTIONS_TOO_MANY The message already has exactly `reactions_uniq_max` reaction emojis, you can't react with a new emoji, see [the docs for more info »](/api/config#client-configuration).
+REACTION_EMPTY Empty reaction provided.
+REACTION_INVALID The specified reaction is invalid.
REG_ID_GENERATE_FAILED The registration id failed to generate due to Telegram having internal problems. Please try again later
+REPLY_MARKUP_BUY_EMPTY Reply markup for buy button empty.
+REPLY_MARKUP_INVALID The provided reply markup is invalid.
+REPLY_MARKUP_TOO_LONG The specified reply_markup is too long.
+REPLY_MESSAGE_ID_INVALID The specified reply-to message ID is invalid.
+REPLY_TO_INVALID The specified `reply_to` field is invalid.
+REPLY_TO_USER_INVALID The replied-to user is invalid.
+RESET_REQUEST_MISSING No password reset is in progress.
+RESULTS_TOO_MUCH Too many results were provided.
+RESULT_ID_DUPLICATE You provided a duplicate result ID.
+RESULT_ID_EMPTY Result ID empty.
+RESULT_ID_INVALID One of the specified result IDs is invalid.
+RESULT_TYPE_INVALID Result type invalid.
+REVOTE_NOT_ALLOWED You cannot change your vote.
+RIGHTS_NOT_MODIFIED The new admin rights are equal to the old rights, no change was made.
+RIGHT_FORBIDDEN Your admin rights do not allow you to do this.
RPC_CALL_FAIL Telegram is having internal problems. Please try again later
RPC_CONNECT_FAILED Telegram is having internal problems. Please try again later
RPC_MCGET_FAIL Telegram is having internal problems. Please try again later
-SIGN_IN_FAILED Failure while signing in due to Telegram having internal problems. Please try again later
+RPC_SEND_FAIL Telegram is having internal problems. Please try again later
+RSA_DECRYPT_FAILED Internal RSA decryption failed.
+SCHEDULE_BOT_NOT_ALLOWED Bots cannot schedule messages.
+SCHEDULE_DATE_INVALID Invalid schedule date provided.
+SCHEDULE_DATE_TOO_LATE You can't schedule a message this far in the future.
+SCHEDULE_STATUS_PRIVATE Can't schedule until user is online, if the user's last seen timestamp is hidden by their privacy settings.
+SCHEDULE_TOO_MUCH There are too many scheduled messages.
+SCORE_INVALID The specified game score is invalid.
+SEARCH_QUERY_EMPTY The search query is empty.
+SEARCH_WITH_LINK_NOT_SUPPORTED You cannot provide a search query and an invite link at the same time.
+SECONDS_INVALID Invalid duration provided.
+SEND_AS_PEER_INVALID You can't send messages as the specified peer.
+SEND_MEDIA_INVALID The specified media is invalid.
+SEND_MESSAGE_MEDIA_INVALID Invalid media provided.
+SEND_MESSAGE_TYPE_INVALID The message type is invalid.
+SENSITIVE_CHANGE_FORBIDDEN You can't change your sensitive content settings.
+SESSION_TOO_FRESH_X This session was created less than 24 hours ago, try again in {value} seconds.
+SETTINGS_INVALID Invalid settings were provided.
+SHA256_HASH_INVALID The provided SHA256 hash is invalid.
+SHORT_NAME_INVALID The specified short name is invalid.
+SHORT_NAME_OCCUPIED The specified short name is already in use.
+SIGN_IN_FAILED Failure while signing in.
+SLOTS_EMPTY The specified slot list is empty.
+SLOWMODE_MULTI_MSGS_DISABLED Slowmode is enabled, you cannot forward multiple messages to this group.
+SLOWMODE_WAIT_X Slowmode is enabled in this chat: wait {value} seconds before sending another message to this chat.
+SLUG_INVALID The specified invoice slug is invalid.
+SMS_CODE_CREATE_FAILED An error occurred while creating the SMS code.
+SRP_ID_INVALID Invalid SRP ID provided.
+SRP_PASSWORD_CHANGED Password has changed.
+START_PARAM_EMPTY The start parameter is empty.
+START_PARAM_INVALID Start parameter invalid.
+START_PARAM_TOO_LONG Start parameter is too long.
+STICKERPACK_STICKERS_TOO_MUCH There are too many stickers in this stickerpack, you can't add any more.
+STICKERSET_INVALID The provided sticker set is invalid.
+STICKERS_EMPTY No sticker provided.
+STICKERS_TOO_MUCH There are too many stickers in this stickerpack, you can't add any more.
+STICKER_DOCUMENT_INVALID The specified sticker document is invalid.
+STICKER_EMOJI_INVALID Sticker emoji invalid.
+STICKER_FILE_INVALID Sticker file invalid.
+STICKER_GIF_DIMENSIONS The specified video sticker has invalid dimensions.
+STICKER_ID_INVALID The provided sticker ID is invalid.
+STICKER_INVALID The provided sticker is invalid.
+STICKER_MIME_INVALID The specified sticker MIME type is invalid.
+STICKER_PNG_DIMENSIONS Sticker png dimensions invalid.
+STICKER_PNG_NOPNG One of the specified stickers is not a valid PNG file.
+STICKER_TGS_NODOC You must send the animated sticker as a document.
+STICKER_TGS_NOTGS Invalid TGS sticker provided.
+STICKER_THUMB_PNG_NOPNG Incorrect stickerset thumb file provided, PNG / WEBP expected.
+STICKER_THUMB_TGS_NOTGS Incorrect stickerset TGS thumb file provided.
+STICKER_VIDEO_BIG The specified video sticker is too big.
+STICKER_VIDEO_NODOC You must send the video sticker as a document.
+STICKER_VIDEO_NOWEBM The specified video sticker is not in webm format.
STORAGE_CHECK_FAILED Server storage check failed due to Telegram having internal problems. Please try again later
+STORAGE_CHOOSE_VOLUME_FAILED Storage choose volume failed due to Telegram having internal problems. Please try again later
STORE_INVALID_SCALAR_TYPE Telegram is having internal problems. Please try again later
-TIMEOUT A timeout occurred while fetching data from the worker
+STORIES_NEVER_CREATED This peer hasn't ever posted any stories.
+STORIES_TOO_MUCH You have hit the maximum active stories limit as specified by the [`story_expiring_limit_*` client configuration parameters](https://core.telegram.org/api/config#story-expiring-limit-default): you should buy a [Premium](/api/premium) subscription, delete an active story, or wait for the oldest story to expire.
+STORY_ID_EMPTY You specified no story IDs.
+STORY_ID_INVALID The specified story ID is invalid.
+STORY_NOT_MODIFIED The new story information you passed is equal to the previous story information, thus it wasn't modified.
+STORY_PERIOD_INVALID The specified story period is invalid for this account.
+STORY_SEND_FLOOD_MONTHLY_X You've hit the monthly story limit as specified by the [`stories_sent_monthly_limit_*` client configuration parameters](https://core.telegram.org/api/config#stories-sent-monthly-limit-default): wait for the specified number of seconds before posting a new story.
+STORY_SEND_FLOOD_WEEKLY_X You've hit the weekly story limit as specified by the [`stories_sent_weekly_limit_*` client configuration parameters](https://core.telegram.org/api/config#stories-sent-weekly-limit-default): wait for the specified number of seconds before posting a new story.
+SWITCH_PM_TEXT_EMPTY The switch_pm.text field was empty.
+TAKEOUT_INIT_DELAY_X Sorry, for security reasons, you will be able to begin downloading your data in {value} seconds. We have notified all your devices about the export request to make sure it's authorized and to give you time to react if it's not.
+TAKEOUT_INVALID The specified takeout ID is invalid.
+TAKEOUT_REQUIRED A [takeout](https://core.telegram.org/api/takeout) session needs to be initialized first, [see here » for more info](/api/takeout).
+TASK_ALREADY_EXISTS An email reset was already requested.
+TEMP_AUTH_KEY_ALREADY_BOUND The passed temporary key is already bound to another **perm_auth_key_id**.
+TEMP_AUTH_KEY_EMPTY No temporary auth key provided.
+THEME_FILE_INVALID Invalid theme file provided.
+THEME_FORMAT_INVALID Invalid theme format provided.
+THEME_INVALID Invalid theme provided.
+THEME_MIME_INVALID The theme's MIME type is invalid.
+THEME_TITLE_INVALID The specified theme title is invalid.
+TITLE_INVALID The specified stickerpack title is invalid.
+TMP_PASSWORD_DISABLED The temporary password is disabled.
+TOKEN_EMPTY The specified token is empty.
+TOKEN_INVALID The provided token is invalid.
+TOKEN_TYPE_INVALID The specified token type is invalid.
+TOPICS_EMPTY You specified no topic IDs.
+TOPIC_CLOSED This topic was closed, you can't send messages to it anymore.
+TOPIC_CLOSE_SEPARATELY The `close` flag cannot be provided together with any of the other flags.
+TOPIC_DELETED The specified topic was deleted.
+TOPIC_HIDE_SEPARATELY The `hide` flag cannot be provided together with any of the other flags.
+TOPIC_ID_INVALID The specified topic ID is invalid.
+TOPIC_NOT_MODIFIED The updated topic info is equal to the current topic info, nothing was changed.
+TOPIC_TITLE_EMPTY The specified topic title is empty.
+TO_LANG_INVALID The specified destination language is invalid.
+TRANSCRIPTION_FAILED Audio transcription failed.
+TTL_DAYS_INVALID The provided TTL is invalid.
+TTL_MEDIA_INVALID Invalid media Time To Live was provided.
+TTL_PERIOD_INVALID The specified TTL period is invalid.
+TYPES_EMPTY No top peer type was provided.
UNKNOWN_METHOD The method you tried to call cannot be called on non-CDN DCs
+UNTIL_DATE_INVALID Invalid until date provided.
UPLOAD_NO_VOLUME Telegram is having internal problems. Please try again later
+URL_INVALID Invalid URL provided.
+USAGE_LIMIT_INVALID The specified usage limit is invalid.
+USERNAMES_ACTIVE_TOO_MUCH The maximum number of active usernames was reached.
+USERNAME_INVALID The provided username is not valid.
+USERNAME_NOT_MODIFIED The username was not modified.
+USERNAME_NOT_OCCUPIED The provided username is not occupied.
+USERNAME_OCCUPIED The provided username is already occupied.
+USERNAME_PURCHASE_AVAILABLE The specified username can be purchased on https://fragment.com.
+USERPIC_UPLOAD_REQUIRED You must have a profile picture to publish your geolocation.
+USERS_TOO_FEW Not enough users (to create a chat, for example).
+USERS_TOO_MUCH The maximum number of users has been exceeded (to create a chat, for example).
+USER_ADMIN_INVALID You're not an admin.
+USER_ALREADY_INVITED You have already invited this user.
+USER_ALREADY_PARTICIPANT The user is already in the group.
+USER_BANNED_IN_CHANNEL You're banned from sending messages in supergroups/channels.
+USER_BLOCKED User blocked.
+USER_BOT Bots can only be admins in channels.
+USER_BOT_INVALID User accounts must provide the `bot` method parameter when calling this method. If there is no such method parameter, this method can only be invoked by bot accounts.
+USER_BOT_REQUIRED This method can only be called by a bot.
+USER_CHANNELS_TOO_MUCH One of the users you tried to add is already in too many channels/supergroups.
+USER_CREATOR You can't leave this channel, because you're its creator.
+USER_DELETED You can't send this secret message because the other participant deleted their account.
+USER_ID_INVALID The provided user ID is invalid.
+USER_INVALID Invalid user provided.
+USER_IS_BLOCKED You were blocked by this user.
+USER_IS_BOT Bots can't send messages to other bots.
+USER_KICKED This user was kicked from this supergroup/channel.
+USER_NOT_MUTUAL_CONTACT The provided user is not a mutual contact.
+USER_NOT_PARTICIPANT You're not a member of this supergroup/channel.
+USER_PRIVACY_RESTRICTED The user's privacy settings do not allow you to do this.
+USER_PUBLIC_MISSING Cannot generate a link to stories posted by a peer without a username.
+USER_RESTRICTED You're spamreported, you can't create channels or chats.
+USER_VOLUME_INVALID The specified user volume is invalid.
+VENUE_ID_INVALID The specified venue ID is invalid.
+VIDEO_CONTENT_TYPE_INVALID The video's content type is invalid.
+VIDEO_FILE_INVALID The specified video file is invalid.
+VIDEO_TITLE_EMPTY The specified video title is empty.
+VOICE_MESSAGES_FORBIDDEN This user's privacy settings forbid you from sending voice messages.
VOLUME_LOC_NOT_FOUND Telegram is having internal problems. Please try again later
+WALLPAPER_FILE_INVALID The specified wallpaper file is invalid.
+WALLPAPER_INVALID The specified wallpaper is invalid.
+WALLPAPER_MIME_INVALID The specified wallpaper MIME type is invalid.
+WALLPAPER_NOT_FOUND The specified wallpaper could not be found.
+WC_CONVERT_URL_INVALID WC convert URL invalid.
+WEBDOCUMENT_INVALID Invalid webdocument URL provided.
+WEBDOCUMENT_MIME_INVALID Invalid webdocument mime type provided.
+WEBDOCUMENT_SIZE_TOO_BIG Webdocument is too big!
+WEBDOCUMENT_URL_INVALID The specified webdocument URL is invalid.
+WEBPAGE_CURL_FAILED Failure while fetching the webpage with cURL.
+WEBPAGE_MEDIA_EMPTY Webpage media empty.
+WEBPAGE_NOT_FOUND A preview for the specified webpage `url` could not be generated.
+WEBPAGE_URL_INVALID The specified webpage `url` is invalid.
+WEBPUSH_AUTH_INVALID The specified web push authentication secret is invalid.
+WEBPUSH_KEY_INVALID The specified web push elliptic curve Diffie-Hellman public key is invalid.
+WEBPUSH_TOKEN_INVALID The specified web push token is invalid.
WORKER_BUSY_TOO_LONG_RETRY Server workers are too busy right now due to Telegram having internal problems. Please try again later
WP_ID_GENERATE_FAILED Telegram is having internal problems. Please try again later
-FILE_WRITE_FAILED Telegram is having internal problems. Please try again later
\ No newline at end of file
+YOU_BLOCKED_USER You blocked this user.
\ No newline at end of file
From 2253d14679e5aec65c9a4cb42fa3d89203109e2b Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
<41898282+github-actions[bot]@users.noreply.github.com>
Date: Thu, 19 Sep 2024 13:06:43 +0200
Subject: [PATCH 22/78] Update unknown_errors (#28)
---
compiler/errors/source/400_BAD_REQUEST.tsv | 45 +++++++++++++++++++
compiler/errors/source/403_FORBIDDEN.tsv | 2 +
compiler/errors/source/406_NOT_ACCEPTABLE.tsv | 3 ++
compiler/errors/source/420_FLOOD.tsv | 2 +
.../errors/source/503_SERVICE_UNAVAILABLE.tsv | 2 +-
5 files changed, 53 insertions(+), 1 deletion(-)
diff --git a/compiler/errors/source/400_BAD_REQUEST.tsv b/compiler/errors/source/400_BAD_REQUEST.tsv
index 9284cd60..a6dae56a 100644
--- a/compiler/errors/source/400_BAD_REQUEST.tsv
+++ b/compiler/errors/source/400_BAD_REQUEST.tsv
@@ -9,6 +9,7 @@ ADMIN_ID_INVALID The specified admin ID is invalid.
ADMIN_RANK_EMOJI_NOT_ALLOWED An admin rank cannot contain emojis.
ADMIN_RANK_INVALID The specified admin rank is invalid.
ADMIN_RIGHTS_EMPTY The chatAdminRights constructor passed in keyboardButtonRequestPeer.peer_type.user_admin_rights has no rights set (i.e. flags is 0).
+AD_EXPIRED The ad has expired (too old or not found).
ALBUM_PHOTOS_TOO_MANY You have uploaded too many profile photos, delete some before retrying.
API_ID_INVALID API ID invalid.
API_ID_PUBLISHED_FLOOD This API id was published somewhere, you can't use it now.
@@ -22,6 +23,7 @@ AUTH_TOKEN_EXPIRED The authorization token has expired.
AUTH_TOKEN_INVALID The specified auth token is invalid.
AUTH_TOKEN_INVALIDX The specified auth token is invalid.
AUTOARCHIVE_NOT_AVAILABLE The autoarchive setting is not available at this time: please check the value of the [autoarchive_setting_available field in client config »](https://core.telegram.org/api/config#client-configuration) before calling this method.
+BALANCE_TOO_LOW The transaction cannot be completed because the current [Telegram Stars balance](https://core.telegram.org/api/stars) is too low.
BANK_CARD_NUMBER_INVALID The specified card number is invalid.
BANNED_RIGHTS_INVALID You provided some invalid flags in the banned rights.
BASE_PORT_LOC_INVALID The base port location is invalid
@@ -31,8 +33,11 @@ BOOSTS_REQUIRED The specified channel must first be [boosted by its users](https
BOOST_NOT_MODIFIED You're already [boosting](https://core.telegram.org/api/boost) the specified channel.
BOOST_PEER_INVALID The specified `boost_peer` is invalid.
BOTS_TOO_MUCH There are too many bots in this chat/channel.
+BOT_ALREADY_DISABLED The connected business bot was already disabled for the specified peer.
+BOT_APP_BOT_INVALID The bot_id passed in the inputBotAppShortName constructor is invalid.
BOT_APP_INVALID The specified bot app is invalid.
BOT_APP_SHORTNAME_INVALID The specified bot app short name is invalid.
+BOT_BUSINESS_MISSING The specified bot is not a business bot (the [user](https://core.telegram.org/constructor/user).`bot_business` flag is not set).
BOT_CHANNELS_NA Bots can't edit admin privileges.
BOT_COMMAND_DESCRIPTION_INVALID The specified command description is invalid.
BOT_COMMAND_INVALID The specified command is invalid.
@@ -43,6 +48,7 @@ BOT_INLINE_DISABLED This bot can't be used in inline mode.
BOT_INVALID This is not a valid bot.
BOT_METHOD_INVALID The method can't be used by bots
BOT_MISSING Only bots can call this method, please use [@stickers](https://t.me/stickers) if you're a user.
+BOT_NOT_CONNECTED_YET No [business bot](https://core.telegram.org/api/business#connected-bots) is connected to the currently logged in user.
BOT_ONESIDE_NOT_AVAIL Bots can't pin messages in PM just for themselves.
BOT_PAYMENTS_DISABLED Please enable bot payments in botfather before calling this method.
BOT_POLLS_DISABLED Sending polls by bots has been disabled
@@ -52,8 +58,13 @@ BOT_WEBVIEW_DISABLED A webview cannot be opened in the specified conditions: emi
BROADCAST_ID_INVALID Broadcast ID invalid.
BROADCAST_PUBLIC_VOTERS_FORBIDDEN You can't forward polls with public voters.
BROADCAST_REQUIRED This method can only be called on a channel, please use stats.getMegagroupStats for supergroups.
+BUSINESS_PEER_INVALID Messages can't be set to the specified peer through the current [business connection](https://core.telegram.org/api/business#connected-bots).
+BUSINESS_RECIPIENTS_EMPTY You didn't set any flag in inputBusinessBotRecipients, thus the bot cannot work with *any* peer.
+BUSINESS_WORK_HOURS_EMPTY No work hours were specified.
+BUSINESS_WORK_HOURS_PERIOD_INVALID The specified work hours are invalid, see [here ยป](https://core.telegram.org/api/business#opening-hours) for the exact requirements.
BUTTON_DATA_INVALID The data of one or more of the buttons you provided is invalid.
BUTTON_ID_INVALID The button_id parameter is invalid
+BUTTON_POS_INVALID The position of one of the keyboard buttons is invalid (i.e. a Game or Pay button not in the first position, and so on...).
BUTTON_TEXT_INVALID The specified button text is invalid.
BUTTON_TYPE_INVALID The type of one or more of the buttons you provided is invalid.
BUTTON_URL_INVALID Button URL invalid.
@@ -77,6 +88,10 @@ CHANNEL_PARICIPANT_MISSING The current user is not in the channel.
CHANNEL_PRIVATE You haven't joined this channel/supergroup.
CHANNEL_TOO_BIG This channel has too many participants (>1000) to be deleted.
CHANNEL_TOO_LARGE Channel is too large to be deleted; this error is issued when trying to delete channels with more than 1000 members (subject to change).
+CHARGE_ALREADY_REFUNDED The transaction was already refunded.
+CHATLINKS_TOO_MUCH Too many [business chat links](https://core.telegram.org/api/business#business-chat-links) were created, please delete some older links.
+CHATLINK_SLUG_EMPTY The specified slug is empty.
+CHATLINK_SLUG_EXPIRED The specified [business chat link](https://core.telegram.org/api/business#business-chat-links) has expired.
CHATLIST_EXCLUDE_INVALID The specified `exclude_peers` are invalid.
CHAT_ABOUT_NOT_MODIFIED About text has not changed.
CHAT_ABOUT_TOO_LONG Chat about too long.
@@ -98,10 +113,13 @@ CHAT_TOO_BIG This method is not available for groups with more than `chat_read_m
CODE_EMPTY The provided code is empty.
CODE_HASH_INVALID Code hash invalid.
CODE_INVALID Code invalid.
+COLLECTIBLE_INVALID The specified collectible is invalid.
+COLLECTIBLE_NOT_FOUND The specified collectible could not be found.
COLOR_INVALID The specified color palette ID was invalid.
CONNECTION_API_ID_INVALID The provided API id is invalid.
CONNECTION_APP_VERSION_EMPTY App version is empty.
CONNECTION_DEVICE_MODEL_EMPTY The device model is empty
+CONNECTION_ID_INVALID The specified connection ID is invalid.
CONNECTION_LANG_PACK_INVALID The specified language pack is not valid
CONNECTION_LAYER_INVALID Layer invalid.
CONNECTION_NOT_INITED The connection was not initialized
@@ -124,6 +142,7 @@ DH_G_A_INVALID g_a invalid.
DOCUMENT_INVALID The specified document is invalid.
EMAIL_HASH_EXPIRED Email hash expired.
EMAIL_INVALID The specified email is invalid.
+EMAIL_NOT_ALLOWED The specified email cannot be used to complete the operation.
EMAIL_NOT_SETUP In order to change the login email with emailVerifyPurposeLoginChange, an existing login email must already be set using emailVerifyPurposeLoginSetup.
EMAIL_UNCONFIRMED Email unconfirmed.
EMAIL_UNCONFIRMED_X The provided email isn't confirmed, {value} is the length of the verification code that was just sent to the email: use [account.verifyEmail](https://core.telegram.org/method/account.verifyEmail) to enter the received verification code and enable the recovery email.
@@ -163,6 +182,8 @@ FILE_PART_X_MISSING Part {value} of the file is missing from storage
FILE_REFERENCE_EMPTY An empty [file reference](https://core.telegram.org/api/file_reference) was specified.
FILE_REFERENCE_EXPIRED File reference expired, it must be refetched as described in [the documentation](https://core.telegram.org/api/file_reference).
FILE_REFERENCE_INVALID The specified [file reference](https://core.telegram.org/api/file_reference) is invalid.
+FILE_REFERENCE_X_EXPIRED The file reference of the media file at index {value} in the passed media array expired, it [must be refreshed](https://core.telegram.org/api/file_reference).
+FILE_REFERENCE_X_INVALID The file reference of the media file at index {value} in the passed media array is invalid.
FILE_TITLE_EMPTY An empty file title was specified.
FILE_TOKEN_INVALID The specified file token is invalid.
FILTER_ID_INVALID The specified filter ID is invalid.
@@ -172,6 +193,7 @@ FILTER_TITLE_EMPTY The title field of the filter is empty.
FIRSTNAME_INVALID The first name is invalid.
FOLDER_ID_EMPTY An empty folder ID was specified.
FOLDER_ID_INVALID Invalid folder ID.
+FORM_EXPIRED The form was generated more than 10 minutes ago and has expired, please re-generate it using [payments.getPaymentForm](https://core.telegram.org/method/payments.getPaymentForm) and pass the new `form_id`.
FORUM_ENABLED You can't execute the specified action because the group is a [forum](https://core.telegram.org/api/forum), disable forum functionality to continue.
FRESH_CHANGE_ADMINS_FORBIDDEN You were just elected admin, you can't add or modify other admins yet.
FROM_MESSAGE_BOT_DISABLED Bots can't use fromMessage min constructors.
@@ -194,10 +216,12 @@ GROUPCALL_NOT_MODIFIED Group call settings weren't modified.
GROUPCALL_SSRC_DUPLICATE_MUCH The app needs to retry joining the group call with a new SSRC value.
GROUPED_MEDIA_INVALID Invalid grouped media.
GROUP_CALL_INVALID The group call is invalid
+HASHTAG_INVALID The specified hashtag is invalid.
HASH_INVALID The provided hash is invalid.
HIDE_REQUESTER_MISSING The join request was missing or was already handled.
IMAGE_PROCESS_FAILED Failure while processing image.
IMPORT_FILE_INVALID The specified chat export file is invalid.
+IMPORT_FORMAT_DATE_INVALID The date specified in the import file is invalid.
IMPORT_FORMAT_UNRECOGNIZED The specified chat export file was exported from an unsupported chat app.
IMPORT_ID_INVALID The specified import ID is invalid.
IMPORT_TOKEN_INVALID The specified token is invalid.
@@ -206,6 +230,7 @@ INPUT_CHATLIST_INVALID The specified folder is invalid.
INPUT_CONSTRUCTOR_INVALID The provided constructor is invalid
INPUT_FETCH_ERROR An error occurred while deserializing TL parameters
INPUT_FETCH_FAIL Failed deserializing TL payload
+INPUT_FILE_INVALID The specified [InputFile](https://core.telegram.org/type/InputFile) is invalid.
INPUT_FILTER_INVALID The specified filter is invalid.
INPUT_LAYER_INVALID The provided layer is invalid
INPUT_METHOD_INVALID The method invoked is invalid in the current schema
@@ -224,6 +249,7 @@ INVITE_SLUG_EMPTY The specified invite slug is empty.
INVITE_SLUG_EXPIRED The specified chat folder link has expired.
INVOICE_PAYLOAD_INVALID The specified invoice payload is invalid.
JOIN_AS_PEER_INVALID The specified peer cannot be used to join a group call.
+LANGUAGE_INVALID The specified lang_code is invalid.
LANG_CODE_INVALID The specified language code is invalid.
LANG_CODE_NOT_SUPPORTED The specified language code is not supported.
LANG_PACK_INVALID The provided language pack is invalid.
@@ -254,8 +280,10 @@ MESSAGE_EMPTY The provided message is empty.
MESSAGE_IDS_EMPTY No message ids were provided.
MESSAGE_ID_INVALID The provided message id is invalid.
MESSAGE_NOT_MODIFIED The provided message data is identical to the previous message data, the message wasn't modified.
+MESSAGE_NOT_READ_YET The specified message wasn't read yet.
MESSAGE_POLL_CLOSED Poll closed.
MESSAGE_TOO_LONG The provided message is too long.
+MESSAGE_TOO_OLD The message is too old, the requested information is not available.
METHOD_INVALID The specified method is invalid.
MIN_DATE_INVALID The specified minimum date is invalid.
MSG_ID_INVALID Invalid message ID provided.
@@ -268,6 +296,8 @@ NEW_SETTINGS_EMPTY No password is set on the current account, and no new passwor
NEW_SETTINGS_INVALID The new password settings are invalid.
NEXT_OFFSET_INVALID The specified offset is longer than 64 bytes.
NOGENERAL_HIDE_FORBIDDEN The hidden parameter is only valid for the General topic message_thread_id=1
+NOT_ELIGIBLE The current user is not eligible to join the Peer-to-Peer Login Program.
+NOT_JOINED The current user hasn't joined the Peer-to-Peer Login Program.
OFFSET_INVALID The provided offset is invalid.
OFFSET_PEER_ID_INVALID The provided offset peer is invalid.
OPTIONS_TOO_MUCH Too many options provided.
@@ -340,12 +370,14 @@ PUBLIC_KEY_REQUIRED A public key is required.
QUERY_ID_EMPTY The query ID is empty.
QUERY_ID_INVALID The query ID is invalid.
QUERY_TOO_SHORT The query string is too short.
+QUICK_REPLIES_TOO_MUCH A maximum of [appConfig.`quick_replies_limit`](https://core.telegram.org/api/config#quick-replies-limit) shortcuts may be created, the limit was reached.
QUIZ_ANSWER_MISSING You can forward a quiz while hiding the original author only after choosing an option in the quiz.
QUIZ_CORRECT_ANSWERS_EMPTY No correct quiz answer was specified.
QUIZ_CORRECT_ANSWERS_TOO_MUCH You specified too many correct answers in a quiz, quizzes can only have one right answer!
QUIZ_CORRECT_ANSWER_INVALID An invalid value was provided to the correct_answers field.
QUIZ_MULTIPLE_INVALID Quizzes can't have the multiple_choice flag set!
QUOTE_TEXT_INVALID The quote_text is invalid
+RAISE_HAND_FORBIDDEN You cannot raise your hand.
RANDOM_ID_EMPTY Random ID empty.
RANDOM_ID_INVALID A provided random ID is invalid.
RANDOM_LENGTH_INVALID Random length invalid.
@@ -353,14 +385,17 @@ RANGES_INVALID Invalid range provided.
REACTIONS_TOO_MANY The message already has exactly `reactions_uniq_max` reaction emojis, you can't react with a new emoji, see [the docs for more info »](/api/config#client-configuration).
REACTION_EMPTY Empty reaction provided.
REACTION_INVALID The specified reaction is invalid.
+RECEIPT_EMPTY The specified receipt is empty.
REFLECTOR_NOT_AVAILABLE The call reflector is not available
REPLY_MARKUP_BUY_EMPTY Reply markup for buy button empty.
REPLY_MARKUP_GAME_EMPTY The provided reply markup for the game is empty
REPLY_MARKUP_INVALID The provided reply markup is invalid.
REPLY_MARKUP_TOO_LONG The specified reply_markup is too long.
+REPLY_MESSAGES_TOO_MUCH Each shortcut can contain a maximum of [appConfig.`quick_reply_messages_limit`](https://core.telegram.org/api/config#quick-reply-messages-limit) messages, the limit was reached.
REPLY_MESSAGE_ID_INVALID The specified reply-to message ID is invalid.
REPLY_TO_INVALID The specified `reply_to` field is invalid.
REPLY_TO_USER_INVALID The replied-to user is invalid.
+REQUEST_TOKEN_INVALID The master DC did not accept the `request_token` from the CDN DC. Continue downloading the file from the master DC using upload.getFile.
RESET_REQUEST_MISSING No password reset is in progress.
RESULTS_TOO_MUCH Too many results were provided.
RESULT_ID_DUPLICATE You provided a duplicate result ID.
@@ -369,6 +404,8 @@ RESULT_ID_INVALID One of the specified result IDs is invalid.
RESULT_TYPE_INVALID Result type invalid.
REVOTE_NOT_ALLOWED You cannot change your vote.
RIGHTS_NOT_MODIFIED The new admin rights are equal to the old rights, no change was made.
+RINGTONE_INVALID The specified ringtone is invalid.
+RINGTONE_MIME_INVALID The MIME type for the ringtone is invalid.
RSA_DECRYPT_FAILED Internal RSA decryption failed.
SAVED_DIALOGS_UNSUPPORTED You cannot use this method
SCHEDULE_BOT_NOT_ALLOWED Bots cannot schedule messages.
@@ -380,12 +417,14 @@ SCORE_INVALID The specified game score is invalid.
SEARCH_QUERY_EMPTY The search query is empty.
SEARCH_WITH_LINK_NOT_SUPPORTED You cannot provide a search query and an invite link at the same time.
SECONDS_INVALID Invalid duration provided.
+SECURE_SECRET_REQUIRED A secure secret is required.
SEND_AS_PEER_INVALID You can't send messages as the specified peer.
SEND_MESSAGE_MEDIA_INVALID Invalid media provided.
SEND_MESSAGE_TYPE_INVALID The message type is invalid.
SESSION_TOO_FRESH_X This session was created less than 24 hours ago, try again in {value} seconds.
SETTINGS_INVALID Invalid settings were provided.
SHA256_HASH_INVALID The provided SHA256 hash is invalid.
+SHORTCUT_INVALID The specified shortcut is invalid.
SHORTNAME_OCCUPY_FAILED An error occurred when trying to register the short-name used for the sticker pack. Try a different name
SHORT_NAME_INVALID The specified short name is invalid.
SHORT_NAME_OCCUPIED The specified short name is already in use.
@@ -393,6 +432,7 @@ SLOTS_EMPTY The specified slot list is empty.
SLOWMODE_MULTI_MSGS_DISABLED Slowmode is enabled, you cannot forward multiple messages to this group.
SLOWMODE_WAIT_X Slowmode is enabled in this chat: wait {value} seconds before sending another message to this chat.
SLUG_INVALID The specified invoice slug is invalid.
+SMSJOB_ID_INVALID The specified job ID is invalid.
SMS_CODE_CREATE_FAILED An error occurred while creating the SMS code.
SRP_ID_INVALID Invalid SRP ID provided.
SRP_PASSWORD_CHANGED Password has changed.
@@ -429,6 +469,7 @@ STORY_PERIOD_INVALID The specified story period is invalid for this account.
STORY_SEND_FLOOD_MONTHLY_X You've hit the monthly story limit as specified by the [`stories_sent_monthly_limit_*` client configuration parameters](https://core.telegram.org/api/config#stories-sent-monthly-limit-default): wait for the specified number of seconds before posting a new story.
STORY_SEND_FLOOD_WEEKLY_X You've hit the weekly story limit as specified by the [`stories_sent_weekly_limit_*` client configuration parameters](https://core.telegram.org/api/config#stories-sent-weekly-limit-default): wait for the specified number of seconds before posting a new story.
SWITCH_PM_TEXT_EMPTY The switch_pm.text field was empty.
+SWITCH_WEBVIEW_URL_INVALID The URL specified in switch_webview.url is invalid!
TAKEOUT_INIT_DELAY_X Sorry, for security reasons, you will be able to begin downloading your data in {value} seconds. We have notified all your devices about the export request to make sure it's authorized and to give you time to react if it's not.
TAKEOUT_INVALID The specified takeout ID is invalid.
TAKEOUT_REQUIRED A [takeout](https://core.telegram.org/api/takeout) session needs to be initialized first, [see here » for more info](/api/takeout).
@@ -440,6 +481,7 @@ THEME_FORMAT_INVALID Invalid theme format provided.
THEME_INVALID Invalid theme provided.
THEME_MIME_INVALID The theme's MIME type is invalid.
THEME_TITLE_INVALID The specified theme title is invalid.
+TIMEZONE_INVALID The specified timezone does not exist.
TITLE_INVALID The specified stickerpack title is invalid.
TMP_PASSWORD_DISABLED The temporary password is disabled.
TMP_PASSWORD_INVALID The temporary password is invalid
@@ -456,6 +498,7 @@ TOPIC_NOT_MODIFIED The updated topic info is equal to the current topic info, no
TOPIC_TITLE_EMPTY The specified topic title is empty.
TO_LANG_INVALID The specified destination language is invalid.
TRANSCRIPTION_FAILED Audio transcription failed.
+TRANSLATE_REQ_QUOTA_EXCEEDED Translation is currently unavailable due to a temporary server-side lack of resources.
TTL_DAYS_INVALID The provided TTL is invalid.
TTL_MEDIA_INVALID Invalid media Time To Live was provided.
TTL_PERIOD_INVALID The specified TTL period is invalid.
@@ -495,6 +538,8 @@ USER_VOLUME_INVALID The specified user volume is invalid.
VENUE_ID_INVALID The specified venue ID is invalid.
VIDEO_CONTENT_TYPE_INVALID The video's content type is invalid.
VIDEO_FILE_INVALID The specified video file is invalid.
+VIDEO_PAUSE_FORBIDDEN You cannot pause the video stream.
+VIDEO_STOP_FORBIDDEN You cannot stop the video stream.
VIDEO_TITLE_EMPTY The specified video title is empty.
VOICE_MESSAGES_FORBIDDEN This user's privacy settings forbid you from sending voice messages.
VOLUME_LOC_NOT_FOUND The volume location can't be found
diff --git a/compiler/errors/source/403_FORBIDDEN.tsv b/compiler/errors/source/403_FORBIDDEN.tsv
index 75e22082..503b5b7d 100644
--- a/compiler/errors/source/403_FORBIDDEN.tsv
+++ b/compiler/errors/source/403_FORBIDDEN.tsv
@@ -74,6 +74,7 @@ CHANNEL_TOO_LARGE Channel is too large to be deleted; this error is issued when
CHATLIST_EXCLUDE_INVALID The specified `exclude_peers` are invalid.
CHAT_ABOUT_NOT_MODIFIED About text has not changed.
CHAT_ABOUT_TOO_LONG Chat about too long.
+CHAT_ACTION_FORBIDDEN You cannot execute this action.
CHAT_ADMIN_INVITE_REQUIRED You do not have the rights to do this.
CHAT_ADMIN_REQUIRED You must be an admin in this chat to do this.
CHAT_DISCUSSION_UNALLOWED You can't enable forum topics in a discussion group linked to a channel.
@@ -505,4 +506,5 @@ WEBPAGE_URL_INVALID The specified webpage `url` is invalid.
WEBPUSH_AUTH_INVALID The specified web push authentication secret is invalid.
WEBPUSH_KEY_INVALID The specified web push elliptic curve Diffie-Hellman public key is invalid.
WEBPUSH_TOKEN_INVALID The specified web push token is invalid.
+YOUR_PRIVACY_RESTRICTED You cannot fetch the read date of this message because you have disallowed other users to do so for *your* messages; to fix, allow other users to see *your* exact last online date OR purchase a [Telegram Premium](https://core.telegram.org/api/premium) subscription.
YOU_BLOCKED_USER You blocked this user.
\ No newline at end of file
diff --git a/compiler/errors/source/406_NOT_ACCEPTABLE.tsv b/compiler/errors/source/406_NOT_ACCEPTABLE.tsv
index 6d4ba0ab..16dc68b4 100644
--- a/compiler/errors/source/406_NOT_ACCEPTABLE.tsv
+++ b/compiler/errors/source/406_NOT_ACCEPTABLE.tsv
@@ -51,6 +51,7 @@ BROADCAST_FORBIDDEN Channel poll voters and reactions cannot be fetched to preve
BROADCAST_ID_INVALID Broadcast ID invalid.
BROADCAST_PUBLIC_VOTERS_FORBIDDEN You can't forward polls with public voters.
BROADCAST_REQUIRED This method can only be called on a channel, please use stats.getMegagroupStats for supergroups.
+BUSINESS_ADDRESS_ACTIVE The user is currently advertising a [Business Location](https://core.telegram.org/api/business#location), the location may only be changed (or removed) using [account.updateBusinessLocation ยป](https://core.telegram.org/method/account.updateBusinessLocation). .
BUTTON_DATA_INVALID The data of one or more of the buttons you provided is invalid.
BUTTON_TEXT_INVALID The specified button text is invalid.
BUTTON_TYPE_INVALID The type of one or more of the buttons you provided is invalid.
@@ -334,6 +335,7 @@ POLL_OPTION_INVALID Invalid poll option provided.
POLL_QUESTION_INVALID One of the poll questions is not acceptable.
POLL_VOTE_REQUIRED Cast a vote in the poll before calling this method.
PREMIUM_ACCOUNT_REQUIRED A premium account is required to execute this action.
+PREMIUM_CURRENTLY_UNAVAILABLE You cannot currently purchase a Premium subscription.
PREMIUM_GIFTCODE_WAS_REFUNDED This gift code can't be redeemed because the giveaway organizer requested a refund
PREMIUM_SUB_ACTIVE_UNTIL_X You already have a premium subscription active until unixtime {value} .
PREVIOUS_CHAT_IMPORT_ACTIVE_WAIT_XMIN Import for this chat is already in progress, wait {value} minutes before starting a new one.
@@ -467,6 +469,7 @@ TTL_MEDIA_INVALID Invalid media Time To Live was provided.
TTL_PERIOD_INVALID The specified TTL period is invalid.
TYPES_EMPTY No top peer type was provided.
UNTIL_DATE_INVALID Invalid until date provided.
+UPDATE_APP_TO_LOGIN Please update to the latest version of MadelineProto to login.
URL_INVALID Invalid URL provided.
USAGE_LIMIT_INVALID The specified usage limit is invalid.
USERNAMES_ACTIVE_TOO_MUCH The maximum number of active usernames was reached.
diff --git a/compiler/errors/source/420_FLOOD.tsv b/compiler/errors/source/420_FLOOD.tsv
index c1b67465..9158d017 100644
--- a/compiler/errors/source/420_FLOOD.tsv
+++ b/compiler/errors/source/420_FLOOD.tsv
@@ -1,7 +1,9 @@
id message
2FA_CONFIRM_WAIT_X A wait of {value} seconds is required because this account is active and protected by a 2FA password
+ADDRESS_INVALID The specified geopoint address is invalid.
FLOOD_PREMIUM_WAIT_X A wait of {value} seconds is required
FLOOD_TEST_PHONE_WAIT_X A wait of {value} seconds is required in the test servers
FLOOD_WAIT_X A wait of {value} seconds is required
+PREMIUM_SUB_ACTIVE_UNTIL_X You already have a premium subscription active until unixtime {value} .
SLOWMODE_WAIT_X A wait of {value} seconds is required to send messages in this chat.
TAKEOUT_INIT_DELAY_X You have to confirm the data export request using one of your mobile devices or wait {value} seconds
\ No newline at end of file
diff --git a/compiler/errors/source/503_SERVICE_UNAVAILABLE.tsv b/compiler/errors/source/503_SERVICE_UNAVAILABLE.tsv
index 4db95a10..0164c93a 100644
--- a/compiler/errors/source/503_SERVICE_UNAVAILABLE.tsv
+++ b/compiler/errors/source/503_SERVICE_UNAVAILABLE.tsv
@@ -1,4 +1,4 @@
id message
ApiCallError Telegram is having internal problems. Please try again later.
-Timeout Telegram is having internal problems. Please try again later.
Timedout Telegram is having internal problems. Please try again later.
+Timeout Telegram is having internal problems. Please try again later.
\ No newline at end of file
From 13e4f16688331a9c01fa19934ae5490e64019f7e Mon Sep 17 00:00:00 2001
From: nick <64551534+null-nick@users.noreply.github.com>
Date: Thu, 19 Sep 2024 13:10:02 +0200
Subject: [PATCH 23/78] update `scrape-errors.yml`
---
.github/workflows/scrape-errors.yml | 27 ++++++++++++---------------
1 file changed, 12 insertions(+), 15 deletions(-)
diff --git a/.github/workflows/scrape-errors.yml b/.github/workflows/scrape-errors.yml
index e5dcf28c..4a16a956 100644
--- a/.github/workflows/scrape-errors.yml
+++ b/.github/workflows/scrape-errors.yml
@@ -1,8 +1,7 @@
name: Scrape Errors
on:
- workflow_dispatch: {} # Allow manually kicking off builds
- schedule:
- - cron: '0 12 * * *' # Every day at 12:00 (noon). Ref https://crontab.guru/examples.html
+ workflow_dispatch: {}
+
jobs:
build:
name: scrape-errors
@@ -11,6 +10,7 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 1
+
- name: Set up Python
uses: actions/setup-python@v3
with:
@@ -24,15 +24,12 @@ jobs:
python sort.py scrape
python sort.py sort
- - name: Open Pull Request
- uses: peter-evans/create-pull-request@v4
- with:
- commit-message: >
- Update unknown_errors
- title: >
- Update Telegram API errors
- body: >
- This is an automated PR. Please check the diff, and the action logs, to check for any funky behaviour.
- branch: automated/api-error-scrape
- labels: automated
- delete-branch: true
+ - name: Commit and Push changes
+ run: |
+ git config --local user.email "github-actions[bot]@users.noreply.github.com"
+ git config --local user.name "GitHub Actions Bot"
+ git add .
+ git commit -m "Automated update of unknown_errors"
+ git push origin main
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
From af42303d612a301a2c510e05e878b2211effaadb Mon Sep 17 00:00:00 2001
From: nick <64551534+null-nick@users.noreply.github.com>
Date: Sat, 28 Sep 2024 13:49:22 +0200
Subject: [PATCH 24/78] Update API scheme to layer 189.
---
compiler/api/source/main_api.tl | 93 +++++++++++++++++++++++++++------
1 file changed, 77 insertions(+), 16 deletions(-)
diff --git a/compiler/api/source/main_api.tl b/compiler/api/source/main_api.tl
index d10824f7..5c5e7568 100644
--- a/compiler/api/source/main_api.tl
+++ b/compiler/api/source/main_api.tl
@@ -1,6 +1,6 @@
// https://github.com/telegramdesktop/tdesktop/blob/dev/Telegram/SourceFiles/mtproto/scheme/api.tl
// https://github.com/telegramdesktop/tdesktop/blob/dev/Telegram/SourceFiles/mtproto/scheme/layer.tl
-// https://github.com/TGScheme/TgSchemeLayers/blob/main/main_api.tl
+// https://github.com/TGScheme/Schema/blob/main/main_api.tl
///////////////////////////////
///////// Main application API
@@ -109,9 +109,10 @@ userStatusOffline#8c703f was_online:int = UserStatus;
userStatusRecently#7b197dc8 flags:# by_me:flags.0?true = UserStatus;
userStatusLastWeek#541a1d1a flags:# by_me:flags.0?true = UserStatus;
userStatusLastMonth#65899777 flags:# by_me:flags.0?true = UserStatus;
+userStatusHidden#cf7d64b1 = UserStatus;
chatEmpty#29562865 id:long = Chat;
-chat#41cbf256 flags:# creator:flags.0?true left:flags.2?true deactivated:flags.5?true call_active:flags.23?true call_not_empty:flags.24?true noforwards:flags.25?true id:long title:string photo:ChatPhoto participants_count:int date:int version:int migrated_to:flags.6?InputChannel admin_rights:flags.14?ChatAdminRights default_banned_rights:flags.18?ChatBannedRights = Chat;
+chat#41cbf256 flags:# creator:flags.0?true kicked:flags.1?true left:flags.2?true deactivated:flags.5?true call_active:flags.23?true call_not_empty:flags.24?true noforwards:flags.25?true id:long title:string photo:ChatPhoto participants_count:int date:int version:int migrated_to:flags.6?InputChannel admin_rights:flags.14?ChatAdminRights default_banned_rights:flags.18?ChatBannedRights = Chat;
chatForbidden#6592a1a7 id:long title:string = Chat;
channel#fe4478bd flags:# creator:flags.0?true left:flags.2?true broadcast:flags.5?true verified:flags.7?true megagroup:flags.8?true restricted:flags.9?true signatures:flags.11?true min:flags.12?true scam:flags.19?true has_link:flags.20?true has_geo:flags.21?true slowmode_enabled:flags.22?true call_active:flags.23?true call_not_empty:flags.24?true fake:flags.25?true gigagroup:flags.26?true noforwards:flags.27?true join_to_send:flags.28?true join_request:flags.29?true forum:flags.30?true flags2:# stories_hidden:flags2.1?true stories_hidden_min:flags2.2?true stories_unavailable:flags2.3?true signature_profiles:flags2.12?true id:long access_hash:flags.13?long title:string username:flags.6?string photo:ChatPhoto date:int restriction_reason:flags.9?Vector admin_rights:flags.14?ChatAdminRights banned_rights:flags.15?ChatBannedRights default_banned_rights:flags.18?ChatBannedRights participants_count:flags.17?int usernames:flags2.0?Vector stories_max_id:flags2.4?int color:flags2.7?PeerColor profile_color:flags2.8?PeerColor emoji_status:flags2.9?EmojiStatus level:flags2.10?int subscription_until_date:flags2.11?int = Chat;
channelForbidden#17d493d5 flags:# broadcast:flags.5?true megagroup:flags.8?true id:long access_hash:long title:string until_date:flags.16?int = Chat;
@@ -122,6 +123,7 @@ channelFull#bbab348d flags:# can_view_participants:flags.3?true can_set_username
chatParticipant#c02d4007 user_id:long inviter_id:long date:int = ChatParticipant;
chatParticipantCreator#e46bcee4 user_id:long = ChatParticipant;
chatParticipantAdmin#a0933f5b user_id:long inviter_id:long date:int = ChatParticipant;
+chatChannelParticipant#c8d7493e = ChatParticipant;
chatParticipantsForbidden#8763d3e1 flags:# chat_id:long self_participant:flags.0?ChatParticipant = ChatParticipants;
chatParticipants#3cbc93f8 chat_id:long participants:Vector version:int = ChatParticipants;
@@ -197,6 +199,15 @@ messageActionRequestedPeerSentMe#93b31848 button_id:int peers:Vector wallpaper:flags.24?WallPaper stories:flags.25?PeerStories business_work_hours:flags2.0?BusinessWorkHours business_location:flags2.1?BusinessLocation business_greeting_message:flags2.2?BusinessGreetingMessage business_away_message:flags2.3?BusinessAwayMessage business_intro:flags2.4?BusinessIntro birthday:flags2.5?Birthday personal_channel_id:flags2.6?long personal_channel_message:flags2.6?int = UserFull;
+userFull#1f58e369 flags:# blocked:flags.0?true phone_calls_available:flags.4?true phone_calls_private:flags.5?true can_pin_message:flags.7?true has_scheduled:flags.12?true video_calls_available:flags.13?true voice_messages_forbidden:flags.20?true translations_disabled:flags.23?true stories_pinned_available:flags.26?true blocked_my_stories_from:flags.27?true wallpaper_overridden:flags.28?true contact_require_premium:flags.29?true read_dates_private:flags.30?true flags2:# sponsored_enabled:flags2.7?true id:long about:flags.1?string settings:PeerSettings personal_photo:flags.21?Photo profile_photo:flags.2?Photo fallback_photo:flags.22?Photo notify_settings:PeerNotifySettings bot_info:flags.3?BotInfo pinned_msg_id:flags.6?int common_chats_count:int folder_id:flags.11?int ttl_period:flags.14?int theme_emoticon:flags.15?string private_forward_name:flags.16?string bot_group_admin_rights:flags.17?ChatAdminRights bot_broadcast_admin_rights:flags.18?ChatAdminRights premium_gifts:flags.19?Vector wallpaper:flags.24?WallPaper stories:flags.25?PeerStories business_work_hours:flags2.0?BusinessWorkHours business_location:flags2.1?BusinessLocation business_greeting_message:flags2.2?BusinessGreetingMessage business_away_message:flags2.3?BusinessAwayMessage business_intro:flags2.4?BusinessIntro birthday:flags2.5?Birthday personal_channel_id:flags2.6?long personal_channel_message:flags2.6?int stargifts_count:flags2.8?int = UserFull;
contact#145ade0b user_id:long mutual:Bool = Contact;
@@ -297,6 +308,7 @@ inputMessagesFilterMyMentions#c1f8e69a = MessagesFilter;
inputMessagesFilterGeo#e7026d0d = MessagesFilter;
inputMessagesFilterContacts#e062db83 = MessagesFilter;
inputMessagesFilterPinned#1bb00451 = MessagesFilter;
+inputMessagesFilterPhotoVideoDocuments#d95e73bb = MessagesFilter;
updateNewMessage#1f2b0afd message:Message pts:int pts_count:int = Update;
updateMessageID#4e90bfd6 id:int random_id:long = Update;
@@ -439,6 +451,8 @@ updateBusinessBotCallbackQuery#1ea2fda7 flags:# query_id:long user_id:long conne
updateStarsRevenueStatus#a584b019 peer:Peer status:StarsRevenueStatus = Update;
updateBotPurchasedPaidMedia#283bd312 user_id:long payload:string qts:int = Update;
updatePaidReactionPrivacy#51ca7aec private:Bool = Update;
+updateTranscribeAudio#88617090 flags:# final:flags.0?true transcription_id:long text:string = Update;
+updateUserPhoto#f227868c user_id:long date:int photo:UserProfilePhoto previous:Bool = Update;
updates.state#a56c2a3e pts:int qts:int date:int seq:int unread_count:int = updates.State;
@@ -607,6 +621,7 @@ webPageEmpty#211a1788 flags:# id:long url:flags.0?string = WebPage;
webPagePending#b0d13e47 flags:# id:long url:flags.0?string date:int = WebPage;
webPage#e89c45b2 flags:# has_large_media:flags.13?true id:long url:string display_url:string hash:int type:flags.0?string site_name:flags.1?string title:flags.2?string description:flags.3?string photo:flags.4?Photo embed_url:flags.5?string embed_type:flags.5?string embed_width:flags.6?int embed_height:flags.6?int duration:flags.7?int author:flags.8?string document:flags.9?Document cached_page:flags.10?Page attributes:flags.12?Vector = WebPage;
webPageNotModified#7311ca11 flags:# cached_page_views:flags.0?int = WebPage;
+webPageUrlPending#d41a5167 url:string = WebPage;
authorization#ad01d61d flags:# current:flags.0?true official_app:flags.1?true password_pending:flags.2?true encrypted_requests_disabled:flags.3?true call_requests_disabled:flags.4?true unconfirmed:flags.5?true hash:long device_model:string platform:string system_version:string api_id:int app_name:string app_version:string date_created:int date_active:int ip:string country:string region:string = Authorization;
@@ -928,7 +943,7 @@ inputWebFileAudioAlbumThumbLocation#f46fe924 flags:# small:flags.2?true document
upload.webFile#21e753bc size:int mime_type:string file_type:storage.FileType mtime:int bytes:bytes = upload.WebFile;
payments.paymentForm#a0058751 flags:# can_save_credentials:flags.2?true password_missing:flags.3?true form_id:long bot_id:long title:string description:string photo:flags.5?WebDocument invoice:Invoice provider_id:long url:string native_provider:flags.4?string native_params:flags.4?DataJSON additional_methods:flags.6?Vector saved_info:flags.0?PaymentRequestedInfo saved_credentials:flags.1?Vector users:Vector = payments.PaymentForm;
-payments.paymentFormStars#7bf6b15c flags:# form_id:long bot_id:long title:string description:string photo:flags.5?WebDocument invoice:Invoice users:Vector = payments.PaymentForm;
+payments.paymentFormStars#7bf6b15c flags:# can_save_credentials:flags.2?true password_missing:flags.3?true form_id:long bot_id:long title:string description:string photo:flags.5?WebDocument invoice:Invoice users:Vector = payments.PaymentForm;
payments.validatedRequestedInfo#d1451883 flags:# id:flags.0?string shipping_options:flags.1?Vector = payments.ValidatedRequestedInfo;
@@ -1032,6 +1047,9 @@ channelAdminLogEventActionChangeEmojiStatus#3ea9feb1 prev_value:EmojiStatus new_
channelAdminLogEventActionChangeEmojiStickerSet#46d840ab prev_stickerset:InputStickerSet new_stickerset:InputStickerSet = ChannelAdminLogEventAction;
channelAdminLogEventActionToggleSignatureProfiles#60a79c79 new_value:Bool = ChannelAdminLogEventAction;
channelAdminLogEventActionParticipantSubExtend#64642db3 prev_participant:ChannelParticipant new_participant:ChannelParticipant = ChannelAdminLogEventAction;
+channelAdminLogEventActionChangeColor#3c2b247b prev_value:int new_value:int = ChannelAdminLogEventAction;
+channelAdminLogEventActionChangeBackgroundEmoji#445fc434 prev_value:long new_value:long = ChannelAdminLogEventAction;
+channelAdminLogEventActionChangeTheme#fe69018d prev_value:string new_value:string = ChannelAdminLogEventAction;
channelAdminLogEvent#1fad68cd id:long date:int user_id:long action:ChannelAdminLogEventAction = ChannelAdminLogEvent;
@@ -1478,6 +1496,7 @@ inputInvoiceSlug#c326caef slug:string = InputInvoice;
inputInvoicePremiumGiftCode#98986c0d purpose:InputStorePaymentPurpose option:PremiumGiftCodeOption = InputInvoice;
inputInvoiceStars#65f00ce3 purpose:InputStorePaymentPurpose = InputInvoice;
inputInvoiceChatInviteSubscription#34e793f1 hash:string = InputInvoice;
+inputInvoiceStarGift#25d8c1d8 flags:# hide_name:flags.0?true user_id:InputPeer gift_id:long message:flags.1?TextWithEntities = InputInvoice;
payments.exportedInvoice#aed0cbd9 url:string = payments.ExportedInvoice;
@@ -1548,7 +1567,7 @@ defaultHistoryTTL#43b46b20 period:int = DefaultHistoryTTL;
exportedContactToken#41bf109b url:string expires:int = ExportedContactToken;
requestPeerTypeUser#5f3b8a00 flags:# bot:flags.0?Bool premium:flags.1?Bool = RequestPeerType;
-requestPeerTypeChat#c9f06e1b flags:# creator:flags.0?true bot_participant:flags.5?true has_username:flags.3?Bool forum:flags.4?Bool user_admin_rights:flags.1?ChatAdminRights bot_admin_rights:flags.2?ChatAdminRights = RequestPeerType;
+requestPeerTypeChat#c9f06e1b flags:# creator:flags.0?true has_username:flags.3?Bool bot_participant:flags.5?true forum:flags.4?Bool user_admin_rights:flags.1?ChatAdminRights bot_admin_rights:flags.2?ChatAdminRights = RequestPeerType;
requestPeerTypeBroadcast#339bef6c flags:# creator:flags.0?true has_username:flags.3?Bool user_admin_rights:flags.1?ChatAdminRights bot_admin_rights:flags.2?ChatAdminRights = RequestPeerType;
emojiListNotModified#481eadfa = EmojiList;
@@ -1588,7 +1607,7 @@ readParticipantDate#4a4ff172 user_id:long date:int = ReadParticipantDate;
inputChatlistDialogFilter#f3e0da33 filter_id:int = InputChatlist;
-exportedChatlistInvite#c5181ac flags:# title:string url:string peers:Vector = ExportedChatlistInvite;
+exportedChatlistInvite#c5181ac flags:# revoked:flags.0?true title:string url:string peers:Vector = ExportedChatlistInvite;
chatlists.exportedChatlistInvite#10e6e3a6 filter:DialogFilter invite:ExportedChatlistInvite = chatlists.ExportedChatlistInvite;
@@ -1835,7 +1854,7 @@ starsTransactionPeerAds#60682812 = StarsTransactionPeer;
starsTopupOption#bd915c0 flags:# extended:flags.1?true stars:long store_product:flags.0?string currency:string amount:long = StarsTopupOption;
-starsTransaction#ee7522d5 flags:# refund:flags.3?true pending:flags.4?true failed:flags.6?true gift:flags.10?true reaction:flags.11?true id:string stars:long date:int peer:StarsTransactionPeer title:flags.0?string description:flags.1?string photo:flags.2?WebDocument transaction_date:flags.5?int transaction_url:flags.5?string bot_payload:flags.7?bytes msg_id:flags.8?int extended_media:flags.9?Vector subscription_period:flags.12?int giveaway_post_id:flags.13?int = StarsTransaction;
+starsTransaction#a9ee4c2 flags:# refund:flags.3?true pending:flags.4?true failed:flags.6?true gift:flags.10?true reaction:flags.11?true subscription:flags.12?true id:string stars:long date:int peer:StarsTransactionPeer title:flags.0?string description:flags.1?string photo:flags.2?WebDocument transaction_date:flags.5?int transaction_url:flags.5?string bot_payload:flags.7?bytes msg_id:flags.8?int extended_media:flags.9?Vector subscription_period:flags.12?int giveaway_post_id:flags.13?int stargift:flags.14?StarGift = StarsTransaction;
payments.starsStatus#bbfa316c flags:# balance:long subscriptions:flags.1?Vector subscriptions_next_offset:flags.2?string subscriptions_missing_balance:flags.4?long history:flags.3?Vector next_offset:flags.0?string chats:Vector users:Vector = payments.StarsStatus;
@@ -1873,6 +1892,33 @@ starsGiveawayOption#94ce852a flags:# extended:flags.0?true default:flags.1?true
starsGiveawayWinnersOption#54236209 flags:# default:flags.0?true users:int per_user_stars:long = StarsGiveawayWinnersOption;
+appWebViewResultUrl#3c1b4f0d url:string = AppWebViewResultUrl;
+
+messages.messageEmpty#3f4e0648 = messages.MessageEmpty;
+
+userStarGifts#6b65b517 flags:# count:int gifts:Vector next_offset:flags.0?string users:Vector = UserStarGifts;
+
+reportResultAddComment#6f09ac31 flags:# optional:flags.0?true option:bytes = ReportResult;
+reportResultReported#8db33c4b = ReportResult;
+reportResultChooseOption#f0e4e0b6 title:string options:Vector = ReportResult;
+
+messageReportOption#7903e3d9 text:string option:bytes = MessageReportOption;
+
+fileLocationUnavailable#7c596b46 volume_id:long local_id:int secret:long = FileLocation;
+
+simpleWebViewResultUrl#882f76bb url:string = SimpleWebViewResultUrl;
+
+starGifts#901689ea hash:int gifts:Vector = StarGifts;
+starGiftsNotModified#a388a368 = StarGifts;
+
+messages.webViewResult#aadf159b result:BotInlineResult users:Vector = messages.WebViewResult;
+
+starGift#aea174ee flags:# limited:flags.0?true id:long sticker:Document stars:long availability_remains:flags.0?int availability_total:flags.0?int convert_stars:long = StarGift;
+
+payments.paymentFormStarGift#b425cfe1 form_id:long invoice:Invoice = PaymentForm;
+
+userStarGift#eea49a6e flags:# name_hidden:flags.0?true unsaved:flags.5?true from_id:flags.1?long date:int gift:StarGift message:flags.2?TextWithEntities msg_id:flags.3?int convert_stars:flags.4?long = UserStarGift;
+
---functions---
invokeAfterMsg#cb9f372d {X:Type} msg_id:long query:!X = X;
@@ -1884,7 +1930,7 @@ invokeWithMessagesRange#365275f2 {X:Type} range:MessageRange query:!X = X;
invokeWithTakeout#aca9fd2e {X:Type} takeout_id:long query:!X = X;
invokeWithBusinessConnection#dd289f8e {X:Type} connection_id:string query:!X = X;
invokeWithGooglePlayIntegrity#1df92984 {X:Type} nonce:string token:string query:!X = X;
-invokeWithApnsSecret#0dae54f8 {X:Type} nonce:string secret:string query:!X = X;
+invokeWithApnsSecret#dae54f8 {X:Type} nonce:string secret:string query:!X = X;
auth.sendCode#a677244f phone_number:string api_id:int api_hash:string settings:CodeSettings = auth.SentCode;
auth.signUp#aac7b717 flags:# no_joined_notifications:flags.0?true phone_number:string phone_code_hash:string first_name:string last_name:string = auth.Authorization;
@@ -2054,6 +2100,8 @@ contacts.importContactToken#13005788 token:string = User;
contacts.editCloseFriends#ba6705f0 id:Vector = Bool;
contacts.setBlocked#94c65c76 flags:# my_stories_from:flags.0?true id:Vector limit:int = Bool;
contacts.getBirthdays#daeda864 = contacts.ContactBirthdays;
+contacts.importCard#4fe196fe export_card:Vector = User;
+contacts.exportCard#84e53737 = Vector;
messages.getMessages#63c66506 id:Vector = messages.Messages;
messages.getDialogs#a0f4cb4f flags:# exclude_pinned:flags.0?true folder_id:flags.1?int offset_date:int offset_id:int offset_peer:InputPeer limit:int hash:long = messages.Dialogs;
@@ -2069,7 +2117,7 @@ messages.sendMedia#7852834e flags:# silent:flags.5?true background:flags.6?true
messages.forwardMessages#d5039208 flags:# silent:flags.5?true background:flags.6?true with_my_score:flags.8?true drop_author:flags.11?true drop_media_captions:flags.12?true noforwards:flags.14?true from_peer:InputPeer id:Vector random_id:Vector to_peer:InputPeer top_msg_id:flags.9?int schedule_date:flags.10?int send_as:flags.13?InputPeer quick_reply_shortcut:flags.17?InputQuickReplyShortcut = Updates;
messages.reportSpam#cf1592db peer:InputPeer = Bool;
messages.getPeerSettings#efd9a6a2 peer:InputPeer = messages.PeerSettings;
-messages.report#8953ab4e peer:InputPeer id:Vector reason:ReportReason message:string = Bool;
+messages.report#fc78af9b peer:InputPeer id:Vector option:bytes message:string = Bool;
messages.getChats#49e9528f id:Vector = messages.Chats;
messages.getFullChat#aeb00b34 chat_id:long = messages.ChatFull;
messages.editChatTitle#73783ffd chat_id:long title:string = Updates;
@@ -2104,7 +2152,7 @@ messages.editChatAdmin#a85bd1c2 chat_id:long user_id:InputUser is_admin:Bool = B
messages.migrateChat#a2875319 chat_id:long = Updates;
messages.searchGlobal#4bc6589a flags:# broadcasts_only:flags.1?true folder_id:flags.0?int q:string filter:MessagesFilter min_date:int max_date:int offset_rate:int offset_peer:InputPeer offset_id:int limit:int = messages.Messages;
messages.reorderStickerSets#78337739 flags:# masks:flags.0?true emojis:flags.1?true order:Vector = Bool;
-messages.getDocumentByHash#b1f2061f sha256:bytes size:long mime_type:string = Document;
+messages.getDocumentByHash#338e2464 sha256:bytes size:int mime_type:string = Document;
messages.getSavedGifs#5cf09635 hash:long = messages.SavedGifs;
messages.saveGif#327a30cb id:InputDocument unsave:Bool = Bool;
messages.getInlineBotResults#514e999d flags:# bot:InputUser peer:InputPeer geo_point:flags.0?InputGeoPoint query:string offset:string = messages.BotResults;
@@ -2219,7 +2267,7 @@ messages.toggleBotInAttachMenu#69f59d69 flags:# write_allowed:flags.0?true bot:I
messages.requestWebView#269dc2c1 flags:# from_bot_menu:flags.4?true silent:flags.5?true compact:flags.7?true peer:InputPeer bot:InputUser url:flags.1?string start_param:flags.3?string theme_params:flags.2?DataJSON platform:string reply_to:flags.0?InputReplyTo send_as:flags.13?InputPeer = WebViewResult;
messages.prolongWebView#b0d81a83 flags:# silent:flags.5?true peer:InputPeer bot:InputUser query_id:long reply_to:flags.0?InputReplyTo send_as:flags.13?InputPeer = Bool;
messages.requestSimpleWebView#413a3e73 flags:# from_switch_webview:flags.1?true from_side_menu:flags.2?true compact:flags.7?true bot:InputUser url:flags.3?string start_param:flags.4?string theme_params:flags.0?DataJSON platform:string = WebViewResult;
-messages.sendWebViewResultMessage#a4314f5 bot_query_id:string result:InputBotInlineResult = WebViewMessageSent;
+messages.sendWebViewResultMessage#ddcf50eb query_id:long = WebViewMessageSent;
messages.sendWebViewData#dc0242c8 bot:InputUser random_id:long button_text:string data:string = Updates;
messages.transcribeAudio#269e9a49 peer:InputPeer msg_id:int = messages.TranscribedAudio;
messages.rateTranscribedAudio#7f1d072f peer:InputPeer msg_id:int transcription_id:long good:Bool = Bool;
@@ -2272,6 +2320,16 @@ messages.requestMainWebView#c9e01e7b flags:# compact:flags.7?true peer:InputPeer
messages.sendPaidReaction#9dd6a67b flags:# peer:InputPeer msg_id:int count:int random_id:long private:flags.0?Bool = Updates;
messages.togglePaidReactionPrivacy#849ad397 peer:InputPeer msg_id:int private:Bool = Bool;
messages.getPaidReactionPrivacy#472455aa = Updates;
+messages.getWebViewResult#22b6c214 peer:InputPeer bot:InputUser query_id:long = messages.WebViewResult;
+messages.forwardMessage#33963bf9 peer:InputPeer id:int random_id:long = Updates;
+messages.convertStarGift#421e027 user_id:InputUser msg_id:int = Bool;
+messages.getUserStarGifts#5e72c7e1 user_id:InputUser offset:string limit:int = UserStarGifts;
+messages.getStatsURL#812c2ae6 flags:# dark:flags.0?true peer:InputPeer params:string = StatsURL;
+messages.getAllChats#875f74be except_ids:Vector = messages.Chats;
+messages.saveStarGift#87acf08e flags:# unsave:flags.0?true user_id:InputUser msg_id:int = Bool;
+messages.getStarGifts#c4563590 hash:int = StarGifts;
+messages.sendEncryptedMultiMedia#cacacaca = messages.SentEncryptedMessage;
+messages.setWebViewResult#e41cd11d query_id:long = Bool;
updates.getState#edd4882a = updates.State;
updates.getDifference#19c2f763 flags:# pts:int pts_limit:flags.1?int pts_total_limit:flags.0?int date:int qts:int qts_limit:flags.2?int = updates.Difference;
@@ -2290,7 +2348,7 @@ upload.getWebFile#24e6818d location:InputWebFileLocation offset:int limit:int =
upload.getCdnFile#395f69da file_token:bytes offset:long limit:int = upload.CdnFile;
upload.reuploadCdnFile#9b2754a8 file_token:bytes request_token:bytes = Vector;
upload.getCdnFileHashes#91dc3f31 file_token:bytes offset:long = Vector;
-upload.getFileHashes#9156982a location:InputFileLocation offset:long = Vector;
+upload.getFileHashes#c7025931 location:InputFileLocation offset:int = Vector;
help.getConfig#c4f9186b = Config;
help.getNearestDc#1fb33026 = NearestDc;
@@ -2317,6 +2375,7 @@ help.getPremiumPromo#b81b93d4 = help.PremiumPromo;
help.getPeerColors#da80f42f hash:int = help.PeerColors;
help.getPeerProfileColors#abcfa9fd hash:int = help.PeerColors;
help.getTimezonesList#49b30240 hash:int = help.TimezonesList;
+help.getAppChangelog#9010ef6f prev_app_version:string = Updates;
channels.readHistory#cc104937 channel:InputChannel max_id:int = Bool;
channels.deleteMessages#84c1fd4e channel:InputChannel id:Vector = messages.AffectedMessages;
@@ -2427,7 +2486,7 @@ payments.launchPrepaidGiveaway#5ff58f20 peer:InputPeer giveaway_id:long purpose:
payments.getStarsTopupOptions#c00ec7d3 = Vector;
payments.getStarsStatus#104fcfa7 peer:InputPeer = payments.StarsStatus;
payments.getStarsTransactions#69da4557 flags:# inbound:flags.0?true outbound:flags.1?true ascending:flags.2?true subscription_id:flags.3?string peer:InputPeer offset:string limit:int = payments.StarsStatus;
-payments.sendStarsForm#2bb731d flags:# form_id:long invoice:InputInvoice = payments.PaymentResult;
+payments.sendStarsForm#7998c914 form_id:long invoice:InputInvoice = payments.PaymentResult;
payments.refundStarsCharge#25ae8f4a user_id:InputUser charge_id:string = Updates;
payments.getStarsRevenueStats#d91ffad6 flags:# dark:flags.0?true peer:InputPeer = payments.StarsRevenueStats;
payments.getStarsRevenueWithdrawalUrl#13bbe8b3 peer:InputPeer stars:long password:InputCheckPasswordSRP = payments.StarsRevenueWithdrawalUrl;
@@ -2438,6 +2497,7 @@ payments.getStarsSubscriptions#32512c5 flags:# missing_balance:flags.0?true peer
payments.changeStarsSubscription#c7770878 flags:# peer:InputPeer subscription_id:string canceled:flags.0?Bool = Bool;
payments.fulfillStarsSubscription#cc5bebb3 peer:InputPeer subscription_id:string = Bool;
payments.getStarsGiveawayOptions#bd1efd3e = Vector;
+payments.requestRecurringPayment#146e958d user_id:InputUser recurring_init_charge:string invoice_media:InputMedia = Updates;
stickers.createStickerSet#9021ab67 flags:# masks:flags.0?true emojis:flags.5?true text_color:flags.6?true user_id:InputUser title:string short_name:string thumb:flags.2?InputDocument stickers:Vector software:flags.3?string = messages.StickerSet;
stickers.removeStickerFromSet#f7760f51 sticker:InputDocument = messages.StickerSet;
@@ -2490,6 +2550,7 @@ langpack.getLanguages#42c6978f lang_pack:string = Vector;
langpack.getLanguage#6a596502 lang_pack:string lang_code:string = LangPackLanguage;
folders.editPeerFolders#6847d0ab folder_peers:Vector = Updates;
+folders.deleteFolder#1c295881 folder_id:int = Updates;
stats.getBroadcastStats#ab42441a flags:# dark:flags.0?true channel:InputChannel = stats.BroadcastStats;
stats.loadAsyncGraph#621d5fa0 flags:# token:string x:flags.0?long = StatsGraph;
@@ -2504,7 +2565,7 @@ stats.getBroadcastRevenueTransactions#69280f channel:InputChannel offset:int lim
chatlists.exportChatlistInvite#8472478e chatlist:InputChatlist title:string peers:Vector = chatlists.ExportedChatlistInvite;
chatlists.deleteExportedInvite#719c5c5e chatlist:InputChatlist slug:string = Bool;
-chatlists.editExportedInvite#653db63d flags:# chatlist:InputChatlist slug:string title:flags.1?string peers:flags.2?Vector = ExportedChatlistInvite;
+chatlists.editExportedInvite#653db63d flags:# revoked:flags.0?true chatlist:InputChatlist slug:string title:flags.1?string peers:flags.2?Vector = ExportedChatlistInvite;
chatlists.getExportedInvites#ce03da83 chatlist:InputChatlist = chatlists.ExportedInvites;
chatlists.checkChatlistInvite#41c10fff slug:string = chatlists.ChatlistInvite;
chatlists.joinChatlistInvite#a6b1e39a slug:string peers:Vector = Updates;
@@ -2529,7 +2590,7 @@ stories.incrementStoryViews#b2028afb peer:InputPeer id:Vector = Bool;
stories.getStoryViewsList#7ed23c57 flags:# just_contacts:flags.0?true reactions_first:flags.2?true forwards_first:flags.3?true peer:InputPeer q:flags.1?string id:int offset:string limit:int = stories.StoryViewsList;
stories.getStoriesViews#28e16cc8 peer:InputPeer id:Vector = stories.StoryViews;
stories.exportStoryLink#7b8def20 peer:InputPeer id:int = ExportedStoryLink;
-stories.report#1923fa8c peer:InputPeer id:Vector reason:ReportReason message:string = Bool;
+stories.report#19d8eb45 peer:InputPeer id:Vector option:bytes message:string = Bool;
stories.activateStealthMode#57bbd166 flags:# past:flags.0?true future:flags.1?true = Updates;
stories.sendReaction#7fd736b2 flags:# add_to_recent:flags.0?true peer:InputPeer story_id:int reaction:Reaction = Updates;
stories.getPeerStories#2c4ada50 peer:InputPeer = stories.PeerStories;
@@ -2557,4 +2618,4 @@ smsjobs.finishJob#4f1ebf24 flags:# job_id:string error:flags.0?string = Bool;
fragment.getCollectibleInfo#be1e85ba collectible:InputCollectible = fragment.CollectibleInfo;
-// LAYER 188
+// LAYER 189
\ No newline at end of file
From ebef8557aeebe364e6119e048c6213d2d6fee018 Mon Sep 17 00:00:00 2001
From: Nick <64551534+null-nick@users.noreply.github.com>
Date: Sun, 6 Oct 2024 08:59:34 +0200
Subject: [PATCH 25/78] Update API scheme to layer 190.
---
compiler/api/source/main_api.tl | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/compiler/api/source/main_api.tl b/compiler/api/source/main_api.tl
index 5c5e7568..9ec19769 100644
--- a/compiler/api/source/main_api.tl
+++ b/compiler/api/source/main_api.tl
@@ -185,13 +185,13 @@ messageActionSetChatTheme#aa786345 emoticon:string = MessageAction;
messageActionChatJoinedByRequest#ebbca3cb = MessageAction;
messageActionWebViewDataSentMe#47dd8079 text:string data:string = MessageAction;
messageActionWebViewDataSent#b4c38cb5 text:string = MessageAction;
-messageActionGiftPremium#c83d6aec flags:# currency:string amount:long months:int crypto_currency:flags.0?string crypto_amount:flags.0?long = MessageAction;
+messageActionGiftPremium#6c6274fa flags:# currency:string amount:long months:int crypto_currency:flags.0?string crypto_amount:flags.0?long message:flags.1?TextWithEntities = MessageAction;
messageActionTopicCreate#d999256 flags:# title:string icon_color:int icon_emoji_id:flags.0?long = MessageAction;
messageActionTopicEdit#c0944820 flags:# title:flags.0?string icon_emoji_id:flags.1?long closed:flags.2?Bool hidden:flags.3?Bool = MessageAction;
messageActionSuggestProfilePhoto#57de635e photo:Photo = MessageAction;
messageActionRequestedPeer#31518e9b button_id:int peers:Vector = MessageAction;
messageActionSetChatWallPaper#5060a3f4 flags:# same:flags.0?true for_both:flags.1?true wallpaper:WallPaper = MessageAction;
-messageActionGiftCode#678c2e09 flags:# via_giveaway:flags.0?true unclaimed:flags.2?true boost_peer:flags.1?Peer months:int slug:string currency:flags.2?string amount:flags.2?long crypto_currency:flags.3?string crypto_amount:flags.3?long = MessageAction;
+messageActionGiftCode#56d03994 flags:# via_giveaway:flags.0?true unclaimed:flags.2?true boost_peer:flags.1?Peer months:int slug:string currency:flags.2?string amount:flags.2?long crypto_currency:flags.3?string crypto_amount:flags.3?long message:flags.4?TextWithEntities = MessageAction;
messageActionGiveawayLaunch#a80f51e4 flags:# stars:flags.0?long = MessageAction;
messageActionGiveawayResults#87e2f155 flags:# stars:flags.0?true winners_count:int unclaimed_count:int = MessageAction;
messageActionBoostApply#cc02aa6d boosts:int = MessageAction;
@@ -1506,7 +1506,7 @@ help.premiumPromo#5334759c status_text:string status_entities:Vector boost_peer:flags.0?InputPeer currency:string amount:long = InputStorePaymentPurpose;
+inputStorePaymentPremiumGiftCode#fb790393 flags:# users:Vector boost_peer:flags.0?InputPeer currency:string amount:long message:flags.1?TextWithEntities = InputStorePaymentPurpose;
inputStorePaymentPremiumGiveaway#160544ca flags:# only_new_subscribers:flags.0?true winners_are_visible:flags.3?true boost_peer:InputPeer additional_peers:flags.1?Vector countries_iso2:flags.2?Vector prize_description:flags.4?string random_id:long until_date:int currency:string amount:long = InputStorePaymentPurpose;
inputStorePaymentStarsTopup#dddd0f56 stars:long currency:string amount:long = InputStorePaymentPurpose;
inputStorePaymentStarsGift#1d741ef7 user_id:InputUser stars:long currency:string amount:long = InputStorePaymentPurpose;
@@ -2618,4 +2618,4 @@ smsjobs.finishJob#4f1ebf24 flags:# job_id:string error:flags.0?string = Bool;
fragment.getCollectibleInfo#be1e85ba collectible:InputCollectible = fragment.CollectibleInfo;
-// LAYER 189
\ No newline at end of file
+// LAYER 190
From 43af9134ad437d00b8dfaf7abbd74dd4b839cf2f Mon Sep 17 00:00:00 2001
From: shriMADhav U k
Date: Sat, 5 Oct 2024 17:58:24 +0200
Subject: [PATCH 26/78] Add alternative_videos to Message
thanks to: https://github.com/TelegramPlayGround/pyrogram/commit/8ba4ebd2459ad42558ecb22f1532adec4c3b1b4d
---
compiler/docs/compiler.py | 1 +
pyrogram/types/messages_and_media/__init__.py | 3 +-
.../messages_and_media/alternative_video.py | 134 ++++++++++++++++++
pyrogram/types/messages_and_media/message.py | 25 +++-
4 files changed, 161 insertions(+), 2 deletions(-)
create mode 100644 pyrogram/types/messages_and_media/alternative_video.py
diff --git a/compiler/docs/compiler.py b/compiler/docs/compiler.py
index cb44a987..3b4df284 100644
--- a/compiler/docs/compiler.py
+++ b/compiler/docs/compiler.py
@@ -399,6 +399,7 @@ def get_title_list(s: str) -> list:
MessageEntity
Photo
Thumbnail
+ AlternativeVideo
Audio
Document
Animation
diff --git a/pyrogram/types/messages_and_media/__init__.py b/pyrogram/types/messages_and_media/__init__.py
index 797926e9..f4da93aa 100644
--- a/pyrogram/types/messages_and_media/__init__.py
+++ b/pyrogram/types/messages_and_media/__init__.py
@@ -16,6 +16,7 @@
# You should have received a copy of the GNU Lesser General Public License
# along with Pyrogram. If not, see .
+from .alternative_video import AlternativeVideo
from .animation import Animation
from .audio import Audio
from .contact import Contact
@@ -45,5 +46,5 @@
__all__ = [
"Animation", "Audio", "Contact", "Document", "Game", "Location", "Message", "MessageEntity", "Photo", "Thumbnail",
"StrippedThumbnail", "Poll", "PollOption", "Sticker", "Venue", "Video", "VideoNote", "Voice", "WebPage", "Dice",
- "Reaction", "WebAppData", "MessageReactions", "Story", "Giveaway"
+ "Reaction", "WebAppData", "MessageReactions", "Story", "Giveaway", "AlternativeVideo"
]
diff --git a/pyrogram/types/messages_and_media/alternative_video.py b/pyrogram/types/messages_and_media/alternative_video.py
new file mode 100644
index 00000000..921830a7
--- /dev/null
+++ b/pyrogram/types/messages_and_media/alternative_video.py
@@ -0,0 +1,134 @@
+# Pyrogram - Telegram MTProto API Client Library for Python
+# Copyright (C) 2017-present Dan
+#
+# This file is part of Pyrogram.
+#
+# Pyrogram is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published
+# by the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Pyrogram is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with Pyrogram. If not, see .
+
+from datetime import datetime
+from typing import List
+
+import pyrogram
+from pyrogram import raw, utils
+from pyrogram import types
+from pyrogram.file_id import FileId, FileType, FileUniqueId, FileUniqueType, ThumbnailSource
+from ..object import Object
+
+
+class AlternativeVideo(Object):
+ """Describes an alternative reencoded quality of a video file.
+
+ Parameters:
+ file_id (``str``):
+ Identifier for this file, which can be used to download or reuse the file.
+
+ file_unique_id (``str``):
+ Unique identifier for this file, which is supposed to be the same over time and for different accounts.
+ Can't be used to download or reuse the file.
+
+ width (``int``):
+ Video width as defined by sender.
+
+ height (``int``):
+ Video height as defined by sender.
+
+ codec (``str``):
+ Codec used for video file encoding, for example, "h264", "h265", or "av1".
+
+ duration (``int``):
+ Duration of the video in seconds as defined by sender.
+
+ file_name (``str``, *optional*):
+ Video file name.
+
+ mime_type (``str``, *optional*):
+ Mime type of a file as defined by sender.
+
+ file_size (``int``, *optional*):
+ File size.
+
+ supports_streaming (``bool``, *optional*):
+ True, if the video was uploaded with streaming support.
+
+ date (:py:obj:`~datetime.datetime`, *optional*):
+ Date the video was sent.
+
+ thumbs (List of :obj:`~pyrogram.types.Thumbnail`, *optional*):
+ Video thumbnails.
+
+ """
+
+ def __init__(
+ self,
+ *,
+ client: "pyrogram.Client" = None,
+ file_id: str,
+ file_unique_id: str,
+ width: int,
+ height: int,
+ codec: str,
+ duration: int,
+ file_name: str = None,
+ mime_type: str = None,
+ file_size: int = None,
+ supports_streaming: bool = None,
+ date: datetime = None,
+ thumbs: List["types.Thumbnail"] = None
+ ):
+ super().__init__(client)
+
+ self.file_id = file_id
+ self.file_unique_id = file_unique_id
+ self.width = width
+ self.height = height
+ self.codec = codec
+ self.duration = duration
+ self.file_name = file_name
+ self.mime_type = mime_type
+ self.file_size = file_size
+ self.supports_streaming = supports_streaming
+ self.date = date
+ self.thumbs = thumbs
+
+ @staticmethod
+ def _parse(
+ client,
+ video: "raw.types.Document",
+ video_attributes: "raw.types.DocumentAttributeVideo",
+ file_name: str
+ ) -> "AlternativeVideo":
+ return AlternativeVideo(
+ file_id=FileId(
+ file_type=FileType.VIDEO,
+ dc_id=video.dc_id,
+ media_id=video.id,
+ access_hash=video.access_hash,
+ file_reference=video.file_reference
+ ).encode() if video else None,
+ file_unique_id=FileUniqueId(
+ file_unique_type=FileUniqueType.DOCUMENT,
+ media_id=video.id
+ ).encode() if video else None,
+ width=video_attributes.w if video_attributes else None,
+ height=video_attributes.h if video_attributes else None,
+ codec=video_attributes.video_codec if video_attributes else None,
+ duration=video_attributes.duration if video_attributes else None,
+ file_name=file_name,
+ mime_type=video.mime_type if video else None,
+ supports_streaming=video_attributes.supports_streaming if video_attributes else None,
+ file_size=video.size if video else None,
+ date=utils.timestamp_to_datetime(video.date) if video else None,
+ thumbs=types.Thumbnail._parse(client, video) if video else None,
+ client=client
+ )
diff --git a/pyrogram/types/messages_and_media/message.py b/pyrogram/types/messages_and_media/message.py
index e3f97464..51a4eeea 100644
--- a/pyrogram/types/messages_and_media/message.py
+++ b/pyrogram/types/messages_and_media/message.py
@@ -179,6 +179,9 @@ class Message(Object, Update):
video (:obj:`~pyrogram.types.Video`, *optional*):
Message is a video, information about the video.
+ alternative_videos (List of :obj:`~pyrogram.types.AlternativeVideo`, *optional*):
+ Alternative qualities of the video, if the message is a video.
+
voice (:obj:`~pyrogram.types.Voice`, *optional*):
Message is a voice message, information about the file.
@@ -393,7 +396,8 @@ def __init__(
"types.ReplyKeyboardRemove",
"types.ForceReply"
] = None,
- reactions: List["types.Reaction"] = None
+ reactions: List["types.Reaction"] = None,
+ alternative_videos: List["types.AlternativeVideo"] = None,
):
super().__init__(client)
@@ -433,6 +437,7 @@ def __init__(
self.animation = animation
self.game = game
self.video = video
+ self.alternative_videos = alternative_videos
self.voice = voice
self.story = story
self.giveaway = giveaway
@@ -668,6 +673,7 @@ async def _parse(
voice = None
animation = None
video = None
+ alternative_videos = []
video_note = None
sticker = None
document = None
@@ -732,6 +738,22 @@ async def _parse(
video = types.Video._parse(client, doc, video_attributes, file_name, media.ttl_seconds)
media_type = enums.MessageMediaType.VIDEO
has_media_spoiler = media.spoiler
+
+ altdocs = media.alt_documents or []
+ for altdoc in altdocs:
+ if isinstance(altdoc, raw.types.Document):
+ altdoc_attributes = {type(i): i for i in altdoc.attributes}
+
+ altdoc_file_name = getattr(
+ altdoc_attributes.get(
+ raw.types.DocumentAttributeFilename, None
+ ), "file_name", None
+ )
+ altdoc_video_attribute = altdoc_attributes.get(raw.types.DocumentAttributeVideo, None)
+ if altdoc_video_attribute:
+ alternative_videos.append(
+ types.AlternativeVideo._parse(client, altdoc, altdoc_video_attribute, altdoc_file_name)
+ )
elif raw.types.DocumentAttributeAudio in attributes:
audio_attributes = attributes[raw.types.DocumentAttributeAudio]
@@ -831,6 +853,7 @@ async def _parse(
story=story,
giveaway=giveaway,
video=video,
+ alternative_videos=types.List(alternative_videos) if alternative_videos else None,
video_note=video_note,
sticker=sticker,
document=document,
From 6263e4cdf015fc224c2b692c630b179ecdd57afd Mon Sep 17 00:00:00 2001
From: Nick <64551534+null-nick@users.noreply.github.com>
Date: Tue, 29 Oct 2024 12:54:28 +0100
Subject: [PATCH 27/78] Update API scheme to layer 192.
---
compiler/api/source/main_api.tl | 69 ++++++++++++++++++---------------
1 file changed, 38 insertions(+), 31 deletions(-)
diff --git a/compiler/api/source/main_api.tl b/compiler/api/source/main_api.tl
index 9ec19769..4c6c3557 100644
--- a/compiler/api/source/main_api.tl
+++ b/compiler/api/source/main_api.tl
@@ -132,7 +132,7 @@ chatPhotoEmpty#37c1011c = ChatPhoto;
chatPhoto#1c6e1c11 flags:# has_video:flags.0?true photo_id:long stripped_thumb:flags.1?bytes dc_id:int = ChatPhoto;
messageEmpty#90a6ca84 flags:# id:int peer_id:flags.0?Peer = Message;
-message#94345242 flags:# out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true post:flags.14?true from_scheduled:flags.18?true legacy:flags.19?true edit_hide:flags.21?true pinned:flags.24?true noforwards:flags.26?true invert_media:flags.27?true flags2:# offline:flags2.1?true id:int from_id:flags.8?Peer from_boosts_applied:flags.29?int peer_id:Peer saved_peer_id:flags.28?Peer fwd_from:flags.2?MessageFwdHeader via_bot_id:flags.11?long via_business_bot_id:flags2.0?long reply_to:flags.3?MessageReplyHeader date:int message:string media:flags.9?MessageMedia reply_markup:flags.6?ReplyMarkup entities:flags.7?Vector views:flags.10?int forwards:flags.10?int replies:flags.23?MessageReplies edit_date:flags.15?int post_author:flags.16?string grouped_id:flags.17?long reactions:flags.20?MessageReactions restriction_reason:flags.22?Vector ttl_period:flags.25?int quick_reply_shortcut_id:flags.30?int effect:flags2.2?long factcheck:flags2.3?FactCheck = Message;
+message#94345242 flags:# out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true post:flags.14?true from_scheduled:flags.18?true legacy:flags.19?true edit_hide:flags.21?true pinned:flags.24?true noforwards:flags.26?true invert_media:flags.27?true flags2:# offline:flags2.1?true video_processing_pending:flags2.4?true id:int from_id:flags.8?Peer from_boosts_applied:flags.29?int peer_id:Peer saved_peer_id:flags.28?Peer fwd_from:flags.2?MessageFwdHeader via_bot_id:flags.11?long via_business_bot_id:flags2.0?long reply_to:flags.3?MessageReplyHeader date:int message:string media:flags.9?MessageMedia reply_markup:flags.6?ReplyMarkup entities:flags.7?Vector views:flags.10?int forwards:flags.10?int replies:flags.23?MessageReplies edit_date:flags.15?int post_author:flags.16?string grouped_id:flags.17?long reactions:flags.20?MessageReactions restriction_reason:flags.22?Vector ttl_period:flags.25?int quick_reply_shortcut_id:flags.30?int effect:flags2.2?long factcheck:flags2.3?FactCheck = Message;
messageService#2b085862 flags:# out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true post:flags.14?true legacy:flags.19?true id:int from_id:flags.8?Peer peer_id:Peer reply_to:flags.3?MessageReplyHeader date:int action:MessageAction ttl_period:flags.25?int = Message;
messageMediaEmpty#3ded6320 = MessageMedia;
@@ -199,13 +199,13 @@ messageActionRequestedPeerSentMe#93b31848 button_id:int peers:Vector wallpaper:flags.24?WallPaper stories:flags.25?PeerStories business_work_hours:flags2.0?BusinessWorkHours business_location:flags2.1?BusinessLocation business_greeting_message:flags2.2?BusinessGreetingMessage business_away_message:flags2.3?BusinessAwayMessage business_intro:flags2.4?BusinessIntro birthday:flags2.5?Birthday personal_channel_id:flags2.6?long personal_channel_message:flags2.6?int stargifts_count:flags2.8?int = UserFull;
+userFull#1f58e369 flags:# blocked:flags.0?true phone_calls_available:flags.4?true phone_calls_private:flags.5?true can_pin_message:flags.7?true has_scheduled:flags.12?true video_calls_available:flags.13?true voice_messages_forbidden:flags.20?true translations_disabled:flags.23?true stories_pinned_available:flags.26?true blocked_my_stories_from:flags.27?true wallpaper_overridden:flags.28?true contact_require_premium:flags.29?true read_dates_private:flags.30?true flags2:# sponsored_enabled:flags2.7?true can_view_revenue:flags2.9?true id:long about:flags.1?string settings:PeerSettings personal_photo:flags.21?Photo profile_photo:flags.2?Photo fallback_photo:flags.22?Photo notify_settings:PeerNotifySettings bot_info:flags.3?BotInfo pinned_msg_id:flags.6?int common_chats_count:int folder_id:flags.11?int ttl_period:flags.14?int theme_emoticon:flags.15?string private_forward_name:flags.16?string bot_group_admin_rights:flags.17?ChatAdminRights bot_broadcast_admin_rights:flags.18?ChatAdminRights premium_gifts:flags.19?Vector wallpaper:flags.24?WallPaper stories:flags.25?PeerStories business_work_hours:flags2.0?BusinessWorkHours business_location:flags2.1?BusinessLocation business_greeting_message:flags2.2?BusinessGreetingMessage business_away_message:flags2.3?BusinessAwayMessage business_intro:flags2.4?BusinessIntro birthday:flags2.5?Birthday personal_channel_id:flags2.6?long personal_channel_message:flags2.6?int stargifts_count:flags2.8?int = UserFull;
contact#145ade0b user_id:long mutual:Bool = Contact;
@@ -378,7 +378,7 @@ updateFolderPeers#19360dc0 folder_peers:Vector pts:int pts_count:int
updatePeerSettings#6a7e7366 peer:Peer settings:PeerSettings = Update;
updatePeerLocated#b4afcfb0 peers:Vector = Update;
updateNewScheduledMessage#39a51dfb message:Message = Update;
-updateDeleteScheduledMessages#90866cee peer:Peer messages:Vector = Update;
+updateDeleteScheduledMessages#f2a71983 flags:# peer:Peer messages:Vector sent_messages:flags.0?Vector = Update;
updateTheme#8216fba3 theme:Theme = Update;
updateGeoLiveViewed#871fb939 peer:Peer msg_id:int = Update;
updateLoginToken#564fe691 = Update;
@@ -944,6 +944,7 @@ upload.webFile#21e753bc size:int mime_type:string file_type:storage.FileType mti
payments.paymentForm#a0058751 flags:# can_save_credentials:flags.2?true password_missing:flags.3?true form_id:long bot_id:long title:string description:string photo:flags.5?WebDocument invoice:Invoice provider_id:long url:string native_provider:flags.4?string native_params:flags.4?DataJSON additional_methods:flags.6?Vector saved_info:flags.0?PaymentRequestedInfo saved_credentials:flags.1?Vector users:Vector = payments.PaymentForm;
payments.paymentFormStars#7bf6b15c flags:# can_save_credentials:flags.2?true password_missing:flags.3?true form_id:long bot_id:long title:string description:string photo:flags.5?WebDocument invoice:Invoice users:Vector = payments.PaymentForm;
+payments.paymentFormStarGift#b425cfe1 form_id:long invoice:Invoice = payments.PaymentForm;
payments.validatedRequestedInfo#d1451883 flags:# id:flags.0?string shipping_options:flags.1?Vector = payments.ValidatedRequestedInfo;
@@ -1496,7 +1497,7 @@ inputInvoiceSlug#c326caef slug:string = InputInvoice;
inputInvoicePremiumGiftCode#98986c0d purpose:InputStorePaymentPurpose option:PremiumGiftCodeOption = InputInvoice;
inputInvoiceStars#65f00ce3 purpose:InputStorePaymentPurpose = InputInvoice;
inputInvoiceChatInviteSubscription#34e793f1 hash:string = InputInvoice;
-inputInvoiceStarGift#25d8c1d8 flags:# hide_name:flags.0?true user_id:InputPeer gift_id:long message:flags.1?TextWithEntities = InputInvoice;
+inputInvoiceStarGift#25d8c1d8 flags:# hide_name:flags.0?true user_id:InputUser gift_id:long message:flags.1?TextWithEntities = InputInvoice;
payments.exportedInvoice#aed0cbd9 url:string = payments.ExportedInvoice;
@@ -1851,10 +1852,11 @@ starsTransactionPeerPremiumBot#250dbaf8 = StarsTransactionPeer;
starsTransactionPeerFragment#e92fd902 = StarsTransactionPeer;
starsTransactionPeer#d80da15d peer:Peer = StarsTransactionPeer;
starsTransactionPeerAds#60682812 = StarsTransactionPeer;
+starsTransactionPeerAPI#f9677aad = StarsTransactionPeer;
starsTopupOption#bd915c0 flags:# extended:flags.1?true stars:long store_product:flags.0?string currency:string amount:long = StarsTopupOption;
-starsTransaction#a9ee4c2 flags:# refund:flags.3?true pending:flags.4?true failed:flags.6?true gift:flags.10?true reaction:flags.11?true subscription:flags.12?true id:string stars:long date:int peer:StarsTransactionPeer title:flags.0?string description:flags.1?string photo:flags.2?WebDocument transaction_date:flags.5?int transaction_url:flags.5?string bot_payload:flags.7?bytes msg_id:flags.8?int extended_media:flags.9?Vector subscription_period:flags.12?int giveaway_post_id:flags.13?int stargift:flags.14?StarGift = StarsTransaction;
+starsTransaction#35d4f276 flags:# refund:flags.3?true pending:flags.4?true failed:flags.6?true gift:flags.10?true reaction:flags.11?true subscription:flags.12?true floodskip:flags.15?true id:string stars:long date:int peer:StarsTransactionPeer title:flags.0?string description:flags.1?string photo:flags.2?WebDocument transaction_date:flags.5?int transaction_url:flags.5?string bot_payload:flags.7?bytes msg_id:flags.8?int extended_media:flags.9?Vector subscription_period:flags.12?int giveaway_post_id:flags.13?int stargift:flags.14?StarGift floodskip_number:flags.15?int = StarsTransaction;
payments.starsStatus#bbfa316c flags:# balance:long subscriptions:flags.1?Vector subscriptions_next_offset:flags.2?string subscriptions_missing_balance:flags.4?long history:flags.3?Vector next_offset:flags.0?string chats:Vector users:Vector = payments.StarsStatus;
@@ -1892,33 +1894,31 @@ starsGiveawayOption#94ce852a flags:# extended:flags.0?true default:flags.1?true
starsGiveawayWinnersOption#54236209 flags:# default:flags.0?true users:int per_user_stars:long = StarsGiveawayWinnersOption;
-appWebViewResultUrl#3c1b4f0d url:string = AppWebViewResultUrl;
+starGift#49c577cd flags:# limited:flags.0?true sold_out:flags.1?true id:long sticker:Document stars:long availability_remains:flags.0?int availability_total:flags.0?int convert_stars:long first_sale_date:flags.1?int last_sale_date:flags.1?int = StarGift;
-messages.messageEmpty#3f4e0648 = messages.MessageEmpty;
+payments.starGiftsNotModified#a388a368 = payments.StarGifts;
+payments.starGifts#901689ea hash:int gifts:Vector = payments.StarGifts;
+
+userStarGift#eea49a6e flags:# name_hidden:flags.0?true unsaved:flags.5?true from_id:flags.1?long date:int gift:StarGift message:flags.2?TextWithEntities msg_id:flags.3?int convert_stars:flags.4?long = UserStarGift;
+
+payments.userStarGifts#6b65b517 flags:# count:int gifts:Vector next_offset:flags.0?string users:Vector = payments.UserStarGifts;
-userStarGifts#6b65b517 flags:# count:int gifts:Vector next_offset:flags.0?string users:Vector = UserStarGifts;
+messageReportOption#7903e3d9 text:string option:bytes = MessageReportOption;
+reportResultChooseOption#f0e4e0b6 title:string options:Vector = ReportResult;
reportResultAddComment#6f09ac31 flags:# optional:flags.0?true option:bytes = ReportResult;
reportResultReported#8db33c4b = ReportResult;
-reportResultChooseOption#f0e4e0b6 title:string options:Vector = ReportResult;
-messageReportOption#7903e3d9 text:string option:bytes = MessageReportOption;
+appWebViewResultUrl#3c1b4f0d url:string = AppWebViewResultUrl;
+
+messages.messageEmpty#3f4e0648 = messages.MessageEmpty;
fileLocationUnavailable#7c596b46 volume_id:long local_id:int secret:long = FileLocation;
simpleWebViewResultUrl#882f76bb url:string = SimpleWebViewResultUrl;
-starGifts#901689ea hash:int gifts:Vector = StarGifts;
-starGiftsNotModified#a388a368 = StarGifts;
-
messages.webViewResult#aadf159b result:BotInlineResult users:Vector = messages.WebViewResult;
-starGift#aea174ee flags:# limited:flags.0?true id:long sticker:Document stars:long availability_remains:flags.0?int availability_total:flags.0?int convert_stars:long = StarGift;
-
-payments.paymentFormStarGift#b425cfe1 form_id:long invoice:Invoice = PaymentForm;
-
-userStarGift#eea49a6e flags:# name_hidden:flags.0?true unsaved:flags.5?true from_id:flags.1?long date:int gift:StarGift message:flags.2?TextWithEntities msg_id:flags.3?int convert_stars:flags.4?long = UserStarGift;
-
---functions---
invokeAfterMsg#cb9f372d {X:Type} msg_id:long query:!X = X;
@@ -2117,7 +2117,7 @@ messages.sendMedia#7852834e flags:# silent:flags.5?true background:flags.6?true
messages.forwardMessages#d5039208 flags:# silent:flags.5?true background:flags.6?true with_my_score:flags.8?true drop_author:flags.11?true drop_media_captions:flags.12?true noforwards:flags.14?true from_peer:InputPeer id:Vector random_id:Vector to_peer:InputPeer top_msg_id:flags.9?int schedule_date:flags.10?int send_as:flags.13?InputPeer quick_reply_shortcut:flags.17?InputQuickReplyShortcut = Updates;
messages.reportSpam#cf1592db peer:InputPeer = Bool;
messages.getPeerSettings#efd9a6a2 peer:InputPeer = messages.PeerSettings;
-messages.report#fc78af9b peer:InputPeer id:Vector option:bytes message:string = Bool;
+messages.report#fc78af9b peer:InputPeer id:Vector option:bytes message:string = ReportResult;
messages.getChats#49e9528f id:Vector = messages.Chats;
messages.getFullChat#aeb00b34 chat_id:long = messages.ChatFull;
messages.editChatTitle#73783ffd chat_id:long title:string = Updates;
@@ -2152,7 +2152,7 @@ messages.editChatAdmin#a85bd1c2 chat_id:long user_id:InputUser is_admin:Bool = B
messages.migrateChat#a2875319 chat_id:long = Updates;
messages.searchGlobal#4bc6589a flags:# broadcasts_only:flags.1?true folder_id:flags.0?int q:string filter:MessagesFilter min_date:int max_date:int offset_rate:int offset_peer:InputPeer offset_id:int limit:int = messages.Messages;
messages.reorderStickerSets#78337739 flags:# masks:flags.0?true emojis:flags.1?true order:Vector = Bool;
-messages.getDocumentByHash#338e2464 sha256:bytes size:int mime_type:string = Document;
+messages.getDocumentByHash#b1f2061f sha256:bytes size:long mime_type:string = Document;
messages.getSavedGifs#5cf09635 hash:long = messages.SavedGifs;
messages.saveGif#327a30cb id:InputDocument unsave:Bool = Bool;
messages.getInlineBotResults#514e999d flags:# bot:InputUser peer:InputPeer geo_point:flags.0?InputGeoPoint query:string offset:string = messages.BotResults;
@@ -2267,7 +2267,7 @@ messages.toggleBotInAttachMenu#69f59d69 flags:# write_allowed:flags.0?true bot:I
messages.requestWebView#269dc2c1 flags:# from_bot_menu:flags.4?true silent:flags.5?true compact:flags.7?true peer:InputPeer bot:InputUser url:flags.1?string start_param:flags.3?string theme_params:flags.2?DataJSON platform:string reply_to:flags.0?InputReplyTo send_as:flags.13?InputPeer = WebViewResult;
messages.prolongWebView#b0d81a83 flags:# silent:flags.5?true peer:InputPeer bot:InputUser query_id:long reply_to:flags.0?InputReplyTo send_as:flags.13?InputPeer = Bool;
messages.requestSimpleWebView#413a3e73 flags:# from_switch_webview:flags.1?true from_side_menu:flags.2?true compact:flags.7?true bot:InputUser url:flags.3?string start_param:flags.4?string theme_params:flags.0?DataJSON platform:string = WebViewResult;
-messages.sendWebViewResultMessage#ddcf50eb query_id:long = WebViewMessageSent;
+messages.sendWebViewResultMessage#a4314f5 bot_query_id:string result:InputBotInlineResult = WebViewMessageSent;
messages.sendWebViewData#dc0242c8 bot:InputUser random_id:long button_text:string data:string = Updates;
messages.transcribeAudio#269e9a49 peer:InputPeer msg_id:int = messages.TranscribedAudio;
messages.rateTranscribedAudio#7f1d072f peer:InputPeer msg_id:int transcription_id:long good:Bool = Bool;
@@ -2320,16 +2320,19 @@ messages.requestMainWebView#c9e01e7b flags:# compact:flags.7?true peer:InputPeer
messages.sendPaidReaction#9dd6a67b flags:# peer:InputPeer msg_id:int count:int random_id:long private:flags.0?Bool = Updates;
messages.togglePaidReactionPrivacy#849ad397 peer:InputPeer msg_id:int private:Bool = Bool;
messages.getPaidReactionPrivacy#472455aa = Updates;
+messages.reportSponsoredMessage#1af3dbb8 peer:InputPeer random_id:bytes option:bytes = channels.SponsoredMessageReportResult;
messages.getWebViewResult#22b6c214 peer:InputPeer bot:InputUser query_id:long = messages.WebViewResult;
messages.forwardMessage#33963bf9 peer:InputPeer id:int random_id:long = Updates;
-messages.convertStarGift#421e027 user_id:InputUser msg_id:int = Bool;
-messages.getUserStarGifts#5e72c7e1 user_id:InputUser offset:string limit:int = UserStarGifts;
+messages.viewSponsoredMessage#673ad8f1 peer:InputPeer random_id:bytes = Bool;
+messages.getBroadcastRevenueTransactions#70990b6d peer:InputPeer offset:int limit:int = BroadcastRevenueTransactions;
messages.getStatsURL#812c2ae6 flags:# dark:flags.0?true peer:InputPeer params:string = StatsURL;
messages.getAllChats#875f74be except_ids:Vector = messages.Chats;
-messages.saveStarGift#87acf08e flags:# unsave:flags.0?true user_id:InputUser msg_id:int = Bool;
-messages.getStarGifts#c4563590 hash:int = StarGifts;
+messages.getSponsoredMessages#9bd2f439 peer:InputPeer = messages.SponsoredMessages;
+messages.getBroadcastRevenueWithdrawalUrl#9df4faad peer:InputPeer password:InputCheckPasswordSRP = BroadcastRevenueWithdrawalUrl;
messages.sendEncryptedMultiMedia#cacacaca = messages.SentEncryptedMessage;
messages.setWebViewResult#e41cd11d query_id:long = Bool;
+messages.clickSponsoredMessage#f093465 flags:# media:flags.0?true fullscreen:flags.1?true peer:InputPeer random_id:bytes = Bool;
+messages.getBroadcastRevenueStats#f788ee19 flags:# dark:flags.0?true peer:InputPeer = BroadcastRevenueStats;
updates.getState#edd4882a = updates.State;
updates.getDifference#19c2f763 flags:# pts:int pts_limit:flags.1?int pts_total_limit:flags.0?int date:int qts:int qts_limit:flags.2?int = updates.Difference;
@@ -2348,7 +2351,7 @@ upload.getWebFile#24e6818d location:InputWebFileLocation offset:int limit:int =
upload.getCdnFile#395f69da file_token:bytes offset:long limit:int = upload.CdnFile;
upload.reuploadCdnFile#9b2754a8 file_token:bytes request_token:bytes = Vector;
upload.getCdnFileHashes#91dc3f31 file_token:bytes offset:long = Vector;
-upload.getFileHashes#c7025931 location:InputFileLocation offset:int = Vector;
+upload.getFileHashes#9156982a location:InputFileLocation offset:long = Vector;
help.getConfig#c4f9186b = Config;
help.getNearestDc#1fb33026 = NearestDc;
@@ -2497,6 +2500,10 @@ payments.getStarsSubscriptions#32512c5 flags:# missing_balance:flags.0?true peer
payments.changeStarsSubscription#c7770878 flags:# peer:InputPeer subscription_id:string canceled:flags.0?Bool = Bool;
payments.fulfillStarsSubscription#cc5bebb3 peer:InputPeer subscription_id:string = Bool;
payments.getStarsGiveawayOptions#bd1efd3e = Vector;
+payments.getStarGifts#c4563590 hash:int = payments.StarGifts;
+payments.getUserStarGifts#5e72c7e1 user_id:InputUser offset:string limit:int = payments.UserStarGifts;
+payments.saveStarGift#87acf08e flags:# unsave:flags.0?true user_id:InputUser msg_id:int = Bool;
+payments.convertStarGift#421e027 user_id:InputUser msg_id:int = Bool;
payments.requestRecurringPayment#146e958d user_id:InputUser recurring_init_charge:string invoice_media:InputMedia = Updates;
stickers.createStickerSet#9021ab67 flags:# masks:flags.0?true emojis:flags.5?true text_color:flags.6?true user_id:InputUser title:string short_name:string thumb:flags.2?InputDocument stickers:Vector software:flags.3?string = messages.StickerSet;
@@ -2590,7 +2597,7 @@ stories.incrementStoryViews#b2028afb peer:InputPeer id:Vector = Bool;
stories.getStoryViewsList#7ed23c57 flags:# just_contacts:flags.0?true reactions_first:flags.2?true forwards_first:flags.3?true peer:InputPeer q:flags.1?string id:int offset:string limit:int = stories.StoryViewsList;
stories.getStoriesViews#28e16cc8 peer:InputPeer id:Vector = stories.StoryViews;
stories.exportStoryLink#7b8def20 peer:InputPeer id:int = ExportedStoryLink;
-stories.report#19d8eb45 peer:InputPeer id:Vector option:bytes message:string = Bool;
+stories.report#19d8eb45 peer:InputPeer id:Vector option:bytes message:string = ReportResult;
stories.activateStealthMode#57bbd166 flags:# past:flags.0?true future:flags.1?true = Updates;
stories.sendReaction#7fd736b2 flags:# add_to_recent:flags.0?true peer:InputPeer story_id:int reaction:Reaction = Updates;
stories.getPeerStories#2c4ada50 peer:InputPeer = stories.PeerStories;
@@ -2600,7 +2607,7 @@ stories.getChatsToSend#a56a8b60 = messages.Chats;
stories.togglePeerStoriesHidden#bd0415c4 peer:InputPeer hidden:Bool = Bool;
stories.getStoryReactionsList#b9b2881f flags:# forwards_first:flags.2?true peer:InputPeer id:int reaction:flags.0?Reaction offset:flags.1?string limit:int = stories.StoryReactionsList;
stories.togglePinnedToTop#b297e9b peer:InputPeer id:Vector = Bool;
-stories.searchPosts#6cea116a flags:# hashtag:flags.0?string area:flags.1?MediaArea offset:string limit:int = stories.FoundStories;
+stories.searchPosts#d1810907 flags:# hashtag:flags.0?string area:flags.1?MediaArea peer:flags.2?InputPeer offset:string limit:int = stories.FoundStories;
premium.getBoostsList#60f67660 flags:# gifts:flags.0?true peer:InputPeer offset:string limit:int = premium.BoostsList;
premium.getMyBoosts#be77b4a = premium.MyBoosts;
@@ -2618,4 +2625,4 @@ smsjobs.finishJob#4f1ebf24 flags:# job_id:string error:flags.0?string = Bool;
fragment.getCollectibleInfo#be1e85ba collectible:InputCollectible = fragment.CollectibleInfo;
-// LAYER 190
+// LAYER 192
From 4c3c9c94100f03a24b069267a0f64463fb897d5f Mon Sep 17 00:00:00 2001
From: nick <64551534+null-nick@users.noreply.github.com>
Date: Thu, 14 Nov 2024 14:30:59 +0100
Subject: [PATCH 28/78] Update API scheme to layer 193.
---
compiler/api/source/main_api.tl | 74 +++++++++++++++++++--------------
1 file changed, 43 insertions(+), 31 deletions(-)
diff --git a/compiler/api/source/main_api.tl b/compiler/api/source/main_api.tl
index 4c6c3557..e266926b 100644
--- a/compiler/api/source/main_api.tl
+++ b/compiler/api/source/main_api.tl
@@ -199,7 +199,7 @@ messageActionRequestedPeerSentMe#93b31848 button_id:int peers:Vector wallpaper:flags.24?WallPaper stories:flags.25?PeerStories business_work_hours:flags2.0?BusinessWorkHours business_location:flags2.1?BusinessLocation business_greeting_message:flags2.2?BusinessGreetingMessage business_away_message:flags2.3?BusinessAwayMessage business_intro:flags2.4?BusinessIntro birthday:flags2.5?Birthday personal_channel_id:flags2.6?long personal_channel_message:flags2.6?int stargifts_count:flags2.8?int = UserFull;
+userFull#1f58e369 flags:# blocked:flags.0?true phone_calls_available:flags.4?true phone_calls_private:flags.5?true can_pin_message:flags.7?true has_scheduled:flags.12?true video_calls_available:flags.13?true voice_messages_forbidden:flags.20?true translations_disabled:flags.23?true stories_pinned_available:flags.26?true blocked_my_stories_from:flags.27?true wallpaper_overridden:flags.28?true contact_require_premium:flags.29?true read_dates_private:flags.30?true flags2:# sponsored_enabled:flags2.7?true can_view_revenue:flags2.9?true bot_can_manage_emoji_status:flags2.10?true id:long about:flags.1?string settings:PeerSettings personal_photo:flags.21?Photo profile_photo:flags.2?Photo fallback_photo:flags.22?Photo notify_settings:PeerNotifySettings bot_info:flags.3?BotInfo pinned_msg_id:flags.6?int common_chats_count:int folder_id:flags.11?int ttl_period:flags.14?int theme_emoticon:flags.15?string private_forward_name:flags.16?string bot_group_admin_rights:flags.17?ChatAdminRights bot_broadcast_admin_rights:flags.18?ChatAdminRights premium_gifts:flags.19?Vector wallpaper:flags.24?WallPaper stories:flags.25?PeerStories business_work_hours:flags2.0?BusinessWorkHours business_location:flags2.1?BusinessLocation business_greeting_message:flags2.2?BusinessGreetingMessage business_away_message:flags2.3?BusinessAwayMessage business_intro:flags2.4?BusinessIntro birthday:flags2.5?Birthday personal_channel_id:flags2.6?long personal_channel_message:flags2.6?int stargifts_count:flags2.8?int = UserFull;
contact#145ade0b user_id:long mutual:Bool = Contact;
@@ -452,6 +452,7 @@ updateStarsRevenueStatus#a584b019 peer:Peer status:StarsRevenueStatus = Update;
updateBotPurchasedPaidMedia#283bd312 user_id:long payload:string qts:int = Update;
updatePaidReactionPrivacy#51ca7aec private:Bool = Update;
updateTranscribeAudio#88617090 flags:# final:flags.0?true transcription_id:long text:string = Update;
+updateBotSubscriptionExpire#a8ae3eb1 user_id:long payload:string until_date:int qts:int = Update;
updateUserPhoto#f227868c user_id:long date:int photo:UserProfilePhoto previous:Bool = Update;
updates.state#a56c2a3e pts:int qts:int date:int seq:int unread_count:int = updates.State;
@@ -559,6 +560,7 @@ inputPrivacyKeyAddedByPhone#d1219bdd = InputPrivacyKey;
inputPrivacyKeyVoiceMessages#aee69d68 = InputPrivacyKey;
inputPrivacyKeyAbout#3823cc40 = InputPrivacyKey;
inputPrivacyKeyBirthday#d65a11cc = InputPrivacyKey;
+inputPrivacyKeyStarGiftsAutoSave#e1732341 = InputPrivacyKey;
privacyKeyStatusTimestamp#bc2eab30 = PrivacyKey;
privacyKeyChatInvite#500e6dfa = PrivacyKey;
@@ -571,6 +573,7 @@ privacyKeyAddedByPhone#42ffd42b = PrivacyKey;
privacyKeyVoiceMessages#697f414 = PrivacyKey;
privacyKeyAbout#a486b761 = PrivacyKey;
privacyKeyBirthday#2000a518 = PrivacyKey;
+privacyKeyStarGiftsAutoSave#2ca4fdf8 = PrivacyKey;
inputPrivacyValueAllowContacts#d09e07b = InputPrivacyRule;
inputPrivacyValueAllowAll#184b35ce = InputPrivacyRule;
@@ -582,6 +585,8 @@ inputPrivacyValueAllowChatParticipants#840649cf chats:Vector = InputPrivac
inputPrivacyValueDisallowChatParticipants#e94f0f86 chats:Vector = InputPrivacyRule;
inputPrivacyValueAllowCloseFriends#2f453e49 = InputPrivacyRule;
inputPrivacyValueAllowPremium#77cdc9f1 = InputPrivacyRule;
+inputPrivacyValueAllowBots#5a4fcce5 = InputPrivacyRule;
+inputPrivacyValueDisallowBots#c4e57915 = InputPrivacyRule;
privacyValueAllowContacts#fffe1bac = PrivacyRule;
privacyValueAllowAll#65427b82 = PrivacyRule;
@@ -593,6 +598,8 @@ privacyValueAllowChatParticipants#6b134e8e chats:Vector = PrivacyRule;
privacyValueDisallowChatParticipants#41c87565 chats:Vector = PrivacyRule;
privacyValueAllowCloseFriends#f7e8d89b = PrivacyRule;
privacyValueAllowPremium#ece9814b = PrivacyRule;
+privacyValueAllowBots#21461b5d = PrivacyRule;
+privacyValueDisallowBots#f6a5f82f = PrivacyRule;
account.privacyRules#50a04e45 rules:Vector chats:Vector users:Vector = account.PrivacyRules;
@@ -663,7 +670,7 @@ messages.stickerSetNotModified#d3f924eb = messages.StickerSet;
botCommand#c27ac8c7 command:string description:string = BotCommand;
-botInfo#82437e74 flags:# has_preview_medias:flags.6?true user_id:flags.0?long description:flags.1?string description_photo:flags.4?Photo description_document:flags.5?Document commands:flags.2?Vector menu_button:flags.3?BotMenuButton privacy_policy_url:flags.7?string = BotInfo;
+botInfo#36607333 flags:# has_preview_medias:flags.6?true user_id:flags.0?long description:flags.1?string description_photo:flags.4?Photo description_document:flags.5?Document commands:flags.2?Vector menu_button:flags.3?BotMenuButton privacy_policy_url:flags.7?string app_settings:flags.8?BotAppSettings = BotInfo;
keyboardButton#a2fa4880 text:string = KeyboardButton;
keyboardButtonUrl#258aff05 text:string url:string = KeyboardButton;
@@ -921,7 +928,7 @@ dataJSON#7d748d04 data:string = DataJSON;
labeledPrice#cb296bf8 label:string amount:long = LabeledPrice;
-invoice#5db95a15 flags:# test:flags.0?true name_requested:flags.1?true phone_requested:flags.2?true email_requested:flags.3?true shipping_address_requested:flags.4?true flexible:flags.5?true phone_to_provider:flags.6?true email_to_provider:flags.7?true recurring:flags.9?true currency:string prices:Vector max_tip_amount:flags.8?long suggested_tip_amounts:flags.8?Vector terms_url:flags.10?string = Invoice;
+invoice#49ee584 flags:# test:flags.0?true name_requested:flags.1?true phone_requested:flags.2?true email_requested:flags.3?true shipping_address_requested:flags.4?true flexible:flags.5?true phone_to_provider:flags.6?true email_to_provider:flags.7?true recurring:flags.9?true currency:string prices:Vector max_tip_amount:flags.8?long suggested_tip_amounts:flags.8?Vector terms_url:flags.10?string subscription_period:flags.11?int = Invoice;
paymentCharge#ea02c27e id:string provider_charge_id:string = PaymentCharge;
@@ -943,7 +950,7 @@ inputWebFileAudioAlbumThumbLocation#f46fe924 flags:# small:flags.2?true document
upload.webFile#21e753bc size:int mime_type:string file_type:storage.FileType mtime:int bytes:bytes = upload.WebFile;
payments.paymentForm#a0058751 flags:# can_save_credentials:flags.2?true password_missing:flags.3?true form_id:long bot_id:long title:string description:string photo:flags.5?WebDocument invoice:Invoice provider_id:long url:string native_provider:flags.4?string native_params:flags.4?DataJSON additional_methods:flags.6?Vector saved_info:flags.0?PaymentRequestedInfo saved_credentials:flags.1?Vector users:Vector = payments.PaymentForm;
-payments.paymentFormStars#7bf6b15c flags:# can_save_credentials:flags.2?true password_missing:flags.3?true form_id:long bot_id:long title:string description:string photo:flags.5?WebDocument invoice:Invoice users:Vector = payments.PaymentForm;
+payments.paymentFormStars#7bf6b15c flags:# can_save_credentials:flags.2?true form_id:long password_missing:flags.3?true bot_id:long title:string description:string photo:flags.5?WebDocument invoice:Invoice users:Vector = payments.PaymentForm;
payments.paymentFormStarGift#b425cfe1 form_id:long invoice:Invoice = payments.PaymentForm;
payments.validatedRequestedInfo#d1451883 flags:# id:flags.0?string shipping_options:flags.1?Vector = payments.ValidatedRequestedInfo;
@@ -1467,7 +1474,7 @@ attachMenuBots#3c4301c0 hash:long bots:Vector users:Vector
attachMenuBotsBot#93bf667f bot:AttachMenuBot users:Vector = AttachMenuBotsBot;
-webViewResultUrl#4d22ff98 flags:# fullsize:flags.1?true query_id:flags.0?long url:string = WebViewResult;
+webViewResultUrl#4d22ff98 flags:# fullsize:flags.1?true fullscreen:flags.2?true query_id:flags.0?long url:string = WebViewResult;
webViewMessageSent#c94511c flags:# msg_id:flags.0?InputBotInlineMessageID = WebViewMessageSent;
@@ -1856,7 +1863,7 @@ starsTransactionPeerAPI#f9677aad = StarsTransactionPeer;
starsTopupOption#bd915c0 flags:# extended:flags.1?true stars:long store_product:flags.0?string currency:string amount:long = StarsTopupOption;
-starsTransaction#35d4f276 flags:# refund:flags.3?true pending:flags.4?true failed:flags.6?true gift:flags.10?true reaction:flags.11?true subscription:flags.12?true floodskip:flags.15?true id:string stars:long date:int peer:StarsTransactionPeer title:flags.0?string description:flags.1?string photo:flags.2?WebDocument transaction_date:flags.5?int transaction_url:flags.5?string bot_payload:flags.7?bytes msg_id:flags.8?int extended_media:flags.9?Vector subscription_period:flags.12?int giveaway_post_id:flags.13?int stargift:flags.14?StarGift floodskip_number:flags.15?int = StarsTransaction;
+starsTransaction#35d4f276 flags:# refund:flags.3?true pending:flags.4?true failed:flags.6?true gift:flags.10?true reaction:flags.11?true subscription:flags.12?true id:string floodskip:flags.15?true stars:long date:int peer:StarsTransactionPeer title:flags.0?string description:flags.1?string photo:flags.2?WebDocument transaction_date:flags.5?int transaction_url:flags.5?string bot_payload:flags.7?bytes msg_id:flags.8?int extended_media:flags.9?Vector subscription_period:flags.12?int giveaway_post_id:flags.13?int stargift:flags.14?StarGift floodskip_number:flags.15?int = StarsTransaction;
payments.starsStatus#bbfa316c flags:# balance:long subscriptions:flags.1?Vector subscriptions_next_offset:flags.2?string subscriptions_missing_balance:flags.4?long history:flags.3?Vector next_offset:flags.0?string chats:Vector users:Vector = payments.StarsStatus;
@@ -1886,7 +1893,7 @@ bots.previewInfo#ca71d64 media:Vector lang_codes:Vector
starsSubscriptionPricing#5416d58 period:int amount:long = StarsSubscriptionPricing;
-starsSubscription#538ecf18 flags:# canceled:flags.0?true can_refulfill:flags.1?true missing_balance:flags.2?true id:string peer:Peer until_date:int pricing:StarsSubscriptionPricing chat_invite_hash:flags.3?string = StarsSubscription;
+starsSubscription#2e6eab1a flags:# canceled:flags.0?true can_refulfill:flags.1?true missing_balance:flags.2?true bot_canceled:flags.7?true id:string peer:Peer until_date:int pricing:StarsSubscriptionPricing chat_invite_hash:flags.3?string title:flags.4?string photo:flags.5?WebDocument invoice_slug:flags.6?string = StarsSubscription;
messageReactor#4ba3a95a flags:# top:flags.0?true my:flags.1?true anonymous:flags.2?true peer_id:flags.3?Peer count:int = MessageReactor;
@@ -1894,7 +1901,7 @@ starsGiveawayOption#94ce852a flags:# extended:flags.0?true default:flags.1?true
starsGiveawayWinnersOption#54236209 flags:# default:flags.0?true users:int per_user_stars:long = StarsGiveawayWinnersOption;
-starGift#49c577cd flags:# limited:flags.0?true sold_out:flags.1?true id:long sticker:Document stars:long availability_remains:flags.0?int availability_total:flags.0?int convert_stars:long first_sale_date:flags.1?int last_sale_date:flags.1?int = StarGift;
+starGift#49c577cd flags:# limited:flags.0?true sold_out:flags.1?true birthday:flags.2?true id:long sticker:Document stars:long availability_remains:flags.0?int availability_total:flags.0?int convert_stars:long first_sale_date:flags.1?int last_sale_date:flags.1?int = StarGift;
payments.starGiftsNotModified#a388a368 = payments.StarGifts;
payments.starGifts#901689ea hash:int gifts:Vector = payments.StarGifts;
@@ -1919,6 +1926,12 @@ simpleWebViewResultUrl#882f76bb url:string = SimpleWebViewResultUrl;
messages.webViewResult#aadf159b result:BotInlineResult users:Vector = messages.WebViewResult;
+botAppSettings#c99b1950 flags:# placeholder_path:flags.0?bytes background_color:flags.1?int background_dark_color:flags.2?int header_color:flags.3?int header_dark_color:flags.4?int = BotAppSettings;
+
+messages.preparedInlineMessage#ff57708d query_id:long result:BotInlineResult peer_types:Vector cache_time:int users:Vector = messages.PreparedInlineMessage;
+
+messages.botPreparedInlineMessage#8ecf0511 id:string expire_date:int = messages.BotPreparedInlineMessage;
+
---functions---
invokeAfterMsg#cb9f372d {X:Type} msg_id:long query:!X = X;
@@ -2112,9 +2125,9 @@ messages.deleteHistory#b08f922a flags:# just_clear:flags.0?true revoke:flags.1?t
messages.deleteMessages#e58e95d2 flags:# revoke:flags.0?true id:Vector = messages.AffectedMessages;
messages.receivedMessages#5a954c0 max_id:int = Vector;
messages.setTyping#58943ee2 flags:# peer:InputPeer top_msg_id:flags.0?int action:SendMessageAction = Bool;
-messages.sendMessage#983f9745 flags:# no_webpage:flags.1?true silent:flags.5?true background:flags.6?true clear_draft:flags.7?true noforwards:flags.14?true update_stickersets_order:flags.15?true invert_media:flags.16?true peer:InputPeer reply_to:flags.0?InputReplyTo message:string random_id:long reply_markup:flags.2?ReplyMarkup entities:flags.3?Vector schedule_date:flags.10?int send_as:flags.13?InputPeer quick_reply_shortcut:flags.17?InputQuickReplyShortcut effect:flags.18?long = Updates;
-messages.sendMedia#7852834e flags:# silent:flags.5?true background:flags.6?true clear_draft:flags.7?true noforwards:flags.14?true update_stickersets_order:flags.15?true invert_media:flags.16?true peer:InputPeer reply_to:flags.0?InputReplyTo media:InputMedia message:string random_id:long reply_markup:flags.2?ReplyMarkup entities:flags.3?Vector schedule_date:flags.10?int send_as:flags.13?InputPeer quick_reply_shortcut:flags.17?InputQuickReplyShortcut effect:flags.18?long = Updates;
-messages.forwardMessages#d5039208 flags:# silent:flags.5?true background:flags.6?true with_my_score:flags.8?true drop_author:flags.11?true drop_media_captions:flags.12?true noforwards:flags.14?true from_peer:InputPeer id:Vector random_id:Vector to_peer:InputPeer top_msg_id:flags.9?int schedule_date:flags.10?int send_as:flags.13?InputPeer quick_reply_shortcut:flags.17?InputQuickReplyShortcut = Updates;
+messages.sendMessage#983f9745 flags:# no_webpage:flags.1?true silent:flags.5?true background:flags.6?true clear_draft:flags.7?true noforwards:flags.14?true update_stickersets_order:flags.15?true invert_media:flags.16?true allow_paid_floodskip:flags.19?true peer:InputPeer reply_to:flags.0?InputReplyTo message:string random_id:long reply_markup:flags.2?ReplyMarkup entities:flags.3?Vector schedule_date:flags.10?int send_as:flags.13?InputPeer quick_reply_shortcut:flags.17?InputQuickReplyShortcut effect:flags.18?long = Updates;
+messages.sendMedia#7852834e flags:# silent:flags.5?true background:flags.6?true clear_draft:flags.7?true noforwards:flags.14?true update_stickersets_order:flags.15?true invert_media:flags.16?true allow_paid_floodskip:flags.19?true peer:InputPeer reply_to:flags.0?InputReplyTo media:InputMedia message:string random_id:long reply_markup:flags.2?ReplyMarkup entities:flags.3?Vector schedule_date:flags.10?int send_as:flags.13?InputPeer quick_reply_shortcut:flags.17?InputQuickReplyShortcut effect:flags.18?long = Updates;
+messages.forwardMessages#d5039208 flags:# silent:flags.5?true background:flags.6?true with_my_score:flags.8?true drop_author:flags.11?true drop_media_captions:flags.12?true noforwards:flags.14?true allow_paid_floodskip:flags.19?true from_peer:InputPeer id:Vector random_id:Vector to_peer:InputPeer top_msg_id:flags.9?int schedule_date:flags.10?int send_as:flags.13?InputPeer quick_reply_shortcut:flags.17?InputQuickReplyShortcut = Updates;
messages.reportSpam#cf1592db peer:InputPeer = Bool;
messages.getPeerSettings#efd9a6a2 peer:InputPeer = messages.PeerSettings;
messages.report#fc78af9b peer:InputPeer id:Vector option:bytes message:string = ReportResult;
@@ -2192,7 +2205,7 @@ messages.faveSticker#b9ffc55b id:InputDocument unfave:Bool = Bool;
messages.getUnreadMentions#f107e790 flags:# peer:InputPeer top_msg_id:flags.0?int offset_id:int add_offset:int limit:int max_id:int min_id:int = messages.Messages;
messages.readMentions#36e5bf4d flags:# peer:InputPeer top_msg_id:flags.0?int = messages.AffectedHistory;
messages.getRecentLocations#702a40e0 peer:InputPeer limit:int hash:long = messages.Messages;
-messages.sendMultiMedia#37b74355 flags:# silent:flags.5?true background:flags.6?true clear_draft:flags.7?true noforwards:flags.14?true update_stickersets_order:flags.15?true invert_media:flags.16?true peer:InputPeer reply_to:flags.0?InputReplyTo multi_media:Vector schedule_date:flags.10?int send_as:flags.13?InputPeer quick_reply_shortcut:flags.17?InputQuickReplyShortcut effect:flags.18?long = Updates;
+messages.sendMultiMedia#37b74355 flags:# silent:flags.5?true background:flags.6?true clear_draft:flags.7?true noforwards:flags.14?true update_stickersets_order:flags.15?true invert_media:flags.16?true allow_paid_floodskip:flags.19?true peer:InputPeer reply_to:flags.0?InputReplyTo multi_media:Vector schedule_date:flags.10?int send_as:flags.13?InputPeer quick_reply_shortcut:flags.17?InputQuickReplyShortcut effect:flags.18?long = Updates;
messages.uploadEncryptedFile#5057c497 peer:InputEncryptedChat file:InputEncryptedFile = EncryptedFile;
messages.searchStickerSets#35705b8a flags:# exclude_featured:flags.0?true q:string hash:long = messages.FoundStickerSets;
messages.getSplitRanges#1cff7e08 = Vector;
@@ -2264,9 +2277,9 @@ messages.searchSentMedia#107e31a0 q:string filter:MessagesFilter limit:int = mes
messages.getAttachMenuBots#16fcc2cb hash:long = AttachMenuBots;
messages.getAttachMenuBot#77216192 bot:InputUser = AttachMenuBotsBot;
messages.toggleBotInAttachMenu#69f59d69 flags:# write_allowed:flags.0?true bot:InputUser enabled:Bool = Bool;
-messages.requestWebView#269dc2c1 flags:# from_bot_menu:flags.4?true silent:flags.5?true compact:flags.7?true peer:InputPeer bot:InputUser url:flags.1?string start_param:flags.3?string theme_params:flags.2?DataJSON platform:string reply_to:flags.0?InputReplyTo send_as:flags.13?InputPeer = WebViewResult;
+messages.requestWebView#269dc2c1 flags:# from_bot_menu:flags.4?true silent:flags.5?true compact:flags.7?true fullscreen:flags.8?true peer:InputPeer bot:InputUser url:flags.1?string start_param:flags.3?string theme_params:flags.2?DataJSON platform:string reply_to:flags.0?InputReplyTo send_as:flags.13?InputPeer = WebViewResult;
messages.prolongWebView#b0d81a83 flags:# silent:flags.5?true peer:InputPeer bot:InputUser query_id:long reply_to:flags.0?InputReplyTo send_as:flags.13?InputPeer = Bool;
-messages.requestSimpleWebView#413a3e73 flags:# from_switch_webview:flags.1?true from_side_menu:flags.2?true compact:flags.7?true bot:InputUser url:flags.3?string start_param:flags.4?string theme_params:flags.0?DataJSON platform:string = WebViewResult;
+messages.requestSimpleWebView#413a3e73 flags:# from_switch_webview:flags.1?true from_side_menu:flags.2?true compact:flags.7?true fullscreen:flags.8?true bot:InputUser url:flags.3?string start_param:flags.4?string theme_params:flags.0?DataJSON platform:string = WebViewResult;
messages.sendWebViewResultMessage#a4314f5 bot_query_id:string result:InputBotInlineResult = WebViewMessageSent;
messages.sendWebViewData#dc0242c8 bot:InputUser random_id:long button_text:string data:string = Updates;
messages.transcribeAudio#269e9a49 peer:InputPeer msg_id:int = messages.TranscribedAudio;
@@ -2288,7 +2301,7 @@ messages.getEmojiProfilePhotoGroups#21a548f3 hash:int = messages.EmojiGroups;
messages.searchCustomEmoji#2c11c0d7 emoticon:string hash:long = EmojiList;
messages.togglePeerTranslations#e47cb579 flags:# disabled:flags.0?true peer:InputPeer = Bool;
messages.getBotApp#34fdc5c3 app:InputBotApp hash:long = messages.BotApp;
-messages.requestAppWebView#53618bce flags:# write_allowed:flags.0?true compact:flags.7?true peer:InputPeer app:InputBotApp start_param:flags.1?string theme_params:flags.2?DataJSON platform:string = WebViewResult;
+messages.requestAppWebView#53618bce flags:# write_allowed:flags.0?true compact:flags.7?true fullscreen:flags.8?true peer:InputPeer app:InputBotApp start_param:flags.1?string theme_params:flags.2?DataJSON platform:string = WebViewResult;
messages.setChatWallPaper#8ffacae1 flags:# for_both:flags.3?true revert:flags.4?true peer:InputPeer wallpaper:flags.0?InputWallPaper settings:flags.2?WallPaperSettings id:flags.1?int = Updates;
messages.searchEmojiStickerSets#92b4494c flags:# exclude_featured:flags.0?true q:string hash:long = messages.FoundStickerSets;
messages.getSavedDialogs#5381d21a flags:# exclude_pinned:flags.0?true offset_date:int offset_id:int offset_peer:InputPeer limit:int hash:long = messages.SavedDialogs;
@@ -2316,23 +2329,24 @@ messages.getAvailableEffects#dea20a39 hash:int = messages.AvailableEffects;
messages.editFactCheck#589ee75 peer:InputPeer msg_id:int text:TextWithEntities = Updates;
messages.deleteFactCheck#d1da940c peer:InputPeer msg_id:int = Updates;
messages.getFactCheck#b9cdc5ee peer:InputPeer msg_id:Vector = Vector;
-messages.requestMainWebView#c9e01e7b flags:# compact:flags.7?true peer:InputPeer bot:InputUser start_param:flags.1?string theme_params:flags.0?DataJSON platform:string = WebViewResult;
+messages.requestMainWebView#c9e01e7b flags:# compact:flags.7?true fullscreen:flags.8?true peer:InputPeer bot:InputUser start_param:flags.1?string theme_params:flags.0?DataJSON platform:string = WebViewResult;
messages.sendPaidReaction#9dd6a67b flags:# peer:InputPeer msg_id:int count:int random_id:long private:flags.0?Bool = Updates;
messages.togglePaidReactionPrivacy#849ad397 peer:InputPeer msg_id:int private:Bool = Bool;
messages.getPaidReactionPrivacy#472455aa = Updates;
+messages.viewSponsoredMessage#673ad8f1 peer:InputPeer random_id:bytes = Bool;
+messages.clickSponsoredMessage#f093465 flags:# media:flags.0?true fullscreen:flags.1?true peer:InputPeer random_id:bytes = Bool;
messages.reportSponsoredMessage#1af3dbb8 peer:InputPeer random_id:bytes option:bytes = channels.SponsoredMessageReportResult;
+messages.getSponsoredMessages#9bd2f439 peer:InputPeer = messages.SponsoredMessages;
messages.getWebViewResult#22b6c214 peer:InputPeer bot:InputUser query_id:long = messages.WebViewResult;
messages.forwardMessage#33963bf9 peer:InputPeer id:int random_id:long = Updates;
-messages.viewSponsoredMessage#673ad8f1 peer:InputPeer random_id:bytes = Bool;
-messages.getBroadcastRevenueTransactions#70990b6d peer:InputPeer offset:int limit:int = BroadcastRevenueTransactions;
+messages.checkDownloadFileParams#50077589 bot:InputUser file_name:string url:string = Bool;
+messages.toggleUserEmojiStatusPermission#6de6392 bot:InputUser enabled:Bool = Bool;
messages.getStatsURL#812c2ae6 flags:# dark:flags.0?true peer:InputPeer params:string = StatsURL;
+messages.getPreparedInlineMessage#857ebdb8 bot:InputUser id:string = messages.PreparedInlineMessage;
messages.getAllChats#875f74be except_ids:Vector = messages.Chats;
-messages.getSponsoredMessages#9bd2f439 peer:InputPeer = messages.SponsoredMessages;
-messages.getBroadcastRevenueWithdrawalUrl#9df4faad peer:InputPeer password:InputCheckPasswordSRP = BroadcastRevenueWithdrawalUrl;
messages.sendEncryptedMultiMedia#cacacaca = messages.SentEncryptedMessage;
messages.setWebViewResult#e41cd11d query_id:long = Bool;
-messages.clickSponsoredMessage#f093465 flags:# media:flags.0?true fullscreen:flags.1?true peer:InputPeer random_id:bytes = Bool;
-messages.getBroadcastRevenueStats#f788ee19 flags:# dark:flags.0?true peer:InputPeer = BroadcastRevenueStats;
+messages.savePreparedInlineMessage#f21f7f2f flags:# result:InputBotInlineResult user_id:InputUser peer_types:flags.0?Vector = messages.BotPreparedInlineMessage;
updates.getState#edd4882a = updates.State;
updates.getDifference#19c2f763 flags:# pts:int pts_limit:flags.1?int pts_total_limit:flags.0?int date:int qts:int qts_limit:flags.2?int = updates.Difference;
@@ -2415,8 +2429,6 @@ channels.editLocation#58e63f6d channel:InputChannel geo_point:InputGeoPoint addr
channels.toggleSlowMode#edd49ef0 channel:InputChannel seconds:int = Updates;
channels.getInactiveChannels#11e831ee = messages.InactiveChats;
channels.convertToGigagroup#b290c69 channel:InputChannel = Updates;
-channels.viewSponsoredMessage#beaedb94 channel:InputChannel random_id:bytes = Bool;
-channels.getSponsoredMessages#ec210fbf channel:InputChannel = messages.SponsoredMessages;
channels.getSendAs#dc770ee peer:InputPeer = channels.SendAsPeers;
channels.deleteParticipantHistory#367544db channel:InputChannel participant:InputPeer = messages.AffectedHistory;
channels.toggleJoinToSend#e4cb9580 channel:InputChannel enabled:Bool = Updates;
@@ -2435,14 +2447,12 @@ channels.reorderPinnedForumTopics#2950a18f flags:# force:flags.0?true channel:In
channels.toggleAntiSpam#68f3e4eb channel:InputChannel enabled:Bool = Updates;
channels.reportAntiSpamFalsePositive#a850a693 channel:InputChannel msg_id:int = Bool;
channels.toggleParticipantsHidden#6a6e7854 channel:InputChannel enabled:Bool = Updates;
-channels.clickSponsoredMessage#1445d75 flags:# media:flags.0?true fullscreen:flags.1?true channel:InputChannel random_id:bytes = Bool;
channels.updateColor#d8aa3671 flags:# for_profile:flags.1?true channel:InputChannel color:flags.2?int background_emoji_id:flags.0?long = Updates;
channels.toggleViewForumAsMessages#9738bb15 channel:InputChannel enabled:Bool = Updates;
channels.getChannelRecommendations#25a71742 flags:# channel:flags.0?InputChannel = messages.Chats;
channels.updateEmojiStatus#f0d3e6a8 channel:InputChannel emoji_status:EmojiStatus = Updates;
channels.setBoostsToUnblockRestrictions#ad399cee channel:InputChannel boosts:int = Updates;
channels.setEmojiStickers#3cd930b7 channel:InputChannel stickerset:InputStickerSet = Bool;
-channels.reportSponsoredMessage#af8ff6b9 channel:InputChannel random_id:bytes option:bytes = channels.SponsoredMessageReportResult;
channels.restrictSponsoredMessages#9ae91519 channel:InputChannel restricted:Bool = Updates;
channels.searchPosts#d19f987b hashtag:string offset_rate:int offset_peer:InputPeer offset_id:int limit:int = messages.Messages;
@@ -2469,6 +2479,7 @@ bots.deletePreviewMedia#2d0135b3 bot:InputUser lang_code:string media:Vector = Bool;
bots.getPreviewInfo#423ab3ad bot:InputUser lang_code:string = bots.PreviewInfo;
bots.getPreviewMedias#a2a5594d bot:InputUser = Vector;
+bots.updateUserEmojiStatus#ed9f30c5 user_id:InputUser emoji_status:EmojiStatus = Bool;
payments.getPaymentForm#37148dbb flags:# invoice:InputInvoice theme_params:flags.0?DataJSON = payments.PaymentForm;
payments.getPaymentReceipt#2478d1cc peer:InputPeer msg_id:int = payments.PaymentReceipt;
@@ -2505,6 +2516,7 @@ payments.getUserStarGifts#5e72c7e1 user_id:InputUser offset:string limit:int = p
payments.saveStarGift#87acf08e flags:# unsave:flags.0?true user_id:InputUser msg_id:int = Bool;
payments.convertStarGift#421e027 user_id:InputUser msg_id:int = Bool;
payments.requestRecurringPayment#146e958d user_id:InputUser recurring_init_charge:string invoice_media:InputMedia = Updates;
+payments.botCancelStarsSubscription#57f9ece6 flags:# restore:flags.0?true user_id:InputUser invoice_slug:flags.1?string charge_id:flags.2?string = Bool;
stickers.createStickerSet#9021ab67 flags:# masks:flags.0?true emojis:flags.5?true text_color:flags.6?true user_id:InputUser title:string short_name:string thumb:flags.2?InputDocument stickers:Vector software:flags.3?string = messages.StickerSet;
stickers.removeStickerFromSet#f7760f51 sticker:InputDocument = messages.StickerSet;
@@ -2566,9 +2578,9 @@ stats.getMessagePublicForwards#5f150144 channel:InputChannel msg_id:int offset:s
stats.getMessageStats#b6e0a3f5 flags:# dark:flags.0?true channel:InputChannel msg_id:int = stats.MessageStats;
stats.getStoryStats#374fef40 flags:# dark:flags.0?true peer:InputPeer id:int = stats.StoryStats;
stats.getStoryPublicForwards#a6437ef6 peer:InputPeer id:int offset:string limit:int = stats.PublicForwards;
-stats.getBroadcastRevenueStats#75dfb671 flags:# dark:flags.0?true channel:InputChannel = stats.BroadcastRevenueStats;
-stats.getBroadcastRevenueWithdrawalUrl#2a65ef73 channel:InputChannel password:InputCheckPasswordSRP = stats.BroadcastRevenueWithdrawalUrl;
-stats.getBroadcastRevenueTransactions#69280f channel:InputChannel offset:int limit:int = stats.BroadcastRevenueTransactions;
+stats.getBroadcastRevenueStats#f788ee19 flags:# dark:flags.0?true peer:InputPeer = stats.BroadcastRevenueStats;
+stats.getBroadcastRevenueWithdrawalUrl#9df4faad peer:InputPeer password:InputCheckPasswordSRP = stats.BroadcastRevenueWithdrawalUrl;
+stats.getBroadcastRevenueTransactions#70990b6d peer:InputPeer offset:int limit:int = stats.BroadcastRevenueTransactions;
chatlists.exportChatlistInvite#8472478e chatlist:InputChatlist title:string peers:Vector = chatlists.ExportedChatlistInvite;
chatlists.deleteExportedInvite#719c5c5e chatlist:InputChatlist slug:string = Bool;
@@ -2625,4 +2637,4 @@ smsjobs.finishJob#4f1ebf24 flags:# job_id:string error:flags.0?string = Bool;
fragment.getCollectibleInfo#be1e85ba collectible:InputCollectible = fragment.CollectibleInfo;
-// LAYER 192
+// LAYER 193
\ No newline at end of file
From 5e6baf0312e898cf80631c4e2de48406d392a36b Mon Sep 17 00:00:00 2001
From: nick <64551534+null-nick@users.noreply.github.com>
Date: Wed, 20 Nov 2024 20:48:06 +0100
Subject: [PATCH 29/78] refactor(session): replace recursion with loop and add
backoff
This refactor replaces recursion with a loop in the session invoke logic. Additionally, a backoff mechanism has been introduced to prevent frequent restarts from crashing the bot / userbot.
thanks to (https://github.com/hydrogram/hydrogram/commit/fd5beaad8865f2985d947a3828a3f1c4c1691253)
Co-Authored-By: Hitalo M. <40531911+HitaloM@users.noreply.github.com>
---
pyrogram/session/session.py | 20 ++++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/pyrogram/session/session.py b/pyrogram/session/session.py
index 9c4acd40..bd02897a 100644
--- a/pyrogram/session/session.py
+++ b/pyrogram/session/session.py
@@ -20,6 +20,7 @@
import bisect
import logging
import os
+from datetime import datetime, timedelta
from hashlib import sha1
from io import BytesIO
from typing import Optional
@@ -54,6 +55,7 @@ class Session:
ACKS_THRESHOLD = 10
PING_INTERVAL = 5
STORED_MSG_IDS_MAX_SIZE = 1000 * 2
+ RECONNECT_THRESHOLD = timedelta(seconds=10)
TRANSPORT_ERRORS = {
404: "auth key not found",
@@ -70,6 +72,7 @@ def __init__(
is_media: bool = False,
is_cdn: bool = False
):
+ self.last_reconnect_attempt = None
self.client = client
self.dc_id = dc_id
self.auth_key = auth_key
@@ -183,6 +186,14 @@ async def stop(self):
log.info("Session stopped")
async def restart(self):
+ now = datetime.now()
+ if (
+ self.last_reconnect_attempt
+ and now - self.last_reconnect_attempt < self.RECONNECT_THRESHOLD
+ ):
+ log.info("Reconnecting too frequently, sleeping for a while")
+ await asyncio.sleep(5)
+ self.last_reconnect_attempt = now
await self.stop()
await self.start()
@@ -401,7 +412,7 @@ async def invoke(
query_name = ".".join(inner_query.QUALNAME.split(".")[1:])
- while True:
+ while retries > 0:
try:
return await self.send(query, timeout=timeout)
except (FloodWait, FloodPremiumWait) as e:
@@ -415,15 +426,16 @@ async def invoke(
await asyncio.sleep(amount)
except (OSError, InternalServerError, ServiceUnavailable) as e:
+ retries -= 1
if retries == 0:
- raise e from None
+ raise e
(log.warning if retries < 2 else log.info)(
'[%s] Retrying "%s" due to: %s',
- Session.MAX_RETRIES - retries + 1,
+ Session.MAX_RETRIES - retries,
query_name, str(e) or repr(e)
)
await asyncio.sleep(0.5)
- return await self.invoke(query, retries - 1, timeout)
+ raise TimeoutError("Exceeded maximum number of retries")
From 583be25d53b126edde10c6dd93ac04f114bd2938 Mon Sep 17 00:00:00 2001
From: Nick <64551534+null-nick@users.noreply.github.com>
Date: Thu, 21 Nov 2024 18:53:55 +0100
Subject: [PATCH 30/78] `Version Bump`
---
pyrogram/__init__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyrogram/__init__.py b/pyrogram/__init__.py
index 5401a918..e548f441 100644
--- a/pyrogram/__init__.py
+++ b/pyrogram/__init__.py
@@ -16,7 +16,7 @@
# You should have received a copy of the GNU Lesser General Public License
# along with Pyrogram. If not, see .
-__version__ = "2.1.4"
+__version__ = "2.1.5"
__license__ = "GNU Lesser General Public License v3.0 (LGPL-3.0)"
__copyright__ = "Copyright (C) 2017-present Dan "
From b490498f6c3c89b2aa17c4dbb8e01eccfc90ab37 Mon Sep 17 00:00:00 2001
From: nick <64551534+null-nick@users.noreply.github.com>
Date: Sat, 23 Nov 2024 18:57:10 +0100
Subject: [PATCH 31/78] Update API scheme to layer 194.
---
compiler/api/source/main_api.tl | 33 +++++++++++++++++++++------------
1 file changed, 21 insertions(+), 12 deletions(-)
diff --git a/compiler/api/source/main_api.tl b/compiler/api/source/main_api.tl
index e266926b..6928f8ed 100644
--- a/compiler/api/source/main_api.tl
+++ b/compiler/api/source/main_api.tl
@@ -81,6 +81,8 @@ inputPhotoLegacyFileLocation#d83466f3 id:long access_hash:long file_reference:by
inputPeerPhotoFileLocation#37257e99 flags:# big:flags.0?true peer:InputPeer photo_id:long = InputFileLocation;
inputStickerSetThumb#9d84f3db stickerset:InputStickerSet thumb_version:int = InputFileLocation;
inputGroupCallStream#598a92a flags:# call:InputGroupCall time_ms:long scale:int video_channel:flags.0?int video_quality:flags.0?int = InputFileLocation;
+inputPeerPhotoFileLocationLegacy#27d69997 flags:# big:flags.0?true peer:InputPeer volume_id:long local_id:int = InputFileLocation;
+inputStickerSetThumbLegacy#dbaeae9 stickerset:InputStickerSet volume_id:long local_id:int = InputFileLocation;
peerUser#59511722 user_id:long = Peer;
peerChat#36c6019a chat_id:long = Peer;
@@ -167,8 +169,8 @@ messageActionChannelMigrateFrom#ea3948e9 title:string chat_id:long = MessageActi
messageActionPinMessage#94bd38ed = MessageAction;
messageActionHistoryClear#9fbab604 = MessageAction;
messageActionGameScore#92a72876 game_id:long score:int = MessageAction;
-messageActionPaymentSentMe#8f31b327 flags:# recurring_init:flags.2?true recurring_used:flags.3?true currency:string total_amount:long payload:bytes info:flags.0?PaymentRequestedInfo shipping_option_id:flags.1?string charge:PaymentCharge = MessageAction;
-messageActionPaymentSent#96163f56 flags:# recurring_init:flags.2?true recurring_used:flags.3?true currency:string total_amount:long invoice_slug:flags.0?string = MessageAction;
+messageActionPaymentSentMe#ffa00ccc flags:# recurring_init:flags.2?true recurring_used:flags.3?true currency:string total_amount:long payload:bytes info:flags.0?PaymentRequestedInfo shipping_option_id:flags.1?string charge:PaymentCharge subscription_until_date:flags.4?int = MessageAction;
+messageActionPaymentSent#c624b16e flags:# recurring_init:flags.2?true recurring_used:flags.3?true currency:string total_amount:long invoice_slug:flags.0?string subscription_until_date:flags.4?int = MessageAction;
messageActionPhoneCall#80e11a7f flags:# video:flags.2?true call_id:long reason:flags.0?PhoneCallDiscardReason duration:flags.1?int = MessageAction;
messageActionScreenshotTaken#4792929b = MessageAction;
messageActionCustomAction#fae69f56 message:string = MessageAction;
@@ -451,8 +453,8 @@ updateBusinessBotCallbackQuery#1ea2fda7 flags:# query_id:long user_id:long conne
updateStarsRevenueStatus#a584b019 peer:Peer status:StarsRevenueStatus = Update;
updateBotPurchasedPaidMedia#283bd312 user_id:long payload:string qts:int = Update;
updatePaidReactionPrivacy#51ca7aec private:Bool = Update;
+updateBotSubscriptionExpire#2d13c6ee user_id:long payload:string invoice_slug:string until_date:int qts:int = Update;
updateTranscribeAudio#88617090 flags:# final:flags.0?true transcription_id:long text:string = Update;
-updateBotSubscriptionExpire#a8ae3eb1 user_id:long payload:string until_date:int qts:int = Update;
updateUserPhoto#f227868c user_id:long date:int photo:UserProfilePhoto previous:Bool = Update;
updates.state#a56c2a3e pts:int qts:int date:int seq:int unread_count:int = updates.State;
@@ -1916,6 +1918,12 @@ reportResultChooseOption#f0e4e0b6 title:string options:Vector cache_time:int users:Vector = messages.PreparedInlineMessage;
+
+botAppSettings#c99b1950 flags:# placeholder_path:flags.0?bytes background_color:flags.1?int background_dark_color:flags.2?int header_color:flags.3?int header_dark_color:flags.4?int = BotAppSettings;
+
appWebViewResultUrl#3c1b4f0d url:string = AppWebViewResultUrl;
messages.messageEmpty#3f4e0648 = messages.MessageEmpty;
@@ -1926,11 +1934,12 @@ simpleWebViewResultUrl#882f76bb url:string = SimpleWebViewResultUrl;
messages.webViewResult#aadf159b result:BotInlineResult users:Vector = messages.WebViewResult;
-botAppSettings#c99b1950 flags:# placeholder_path:flags.0?bytes background_color:flags.1?int background_dark_color:flags.2?int header_color:flags.3?int header_dark_color:flags.4?int = BotAppSettings;
+ipPortSecret#37982646 ipv4:int port:int secret:bytes = IpPort;
+ipPort#d433ad73 ipv4:int port:int = IpPort;
-messages.preparedInlineMessage#ff57708d query_id:long result:BotInlineResult peer_types:Vector cache_time:int users:Vector = messages.PreparedInlineMessage;
+accessPointRule#4679b65f phone_prefix_rules:string dc_id:int ips:vector = AccessPointRule;
-messages.botPreparedInlineMessage#8ecf0511 id:string expire_date:int = messages.BotPreparedInlineMessage;
+help.configSimple#5a592a6c date:int expires:int rules:vector = help.ConfigSimple;
---functions---
@@ -2337,16 +2346,14 @@ messages.viewSponsoredMessage#673ad8f1 peer:InputPeer random_id:bytes = Bool;
messages.clickSponsoredMessage#f093465 flags:# media:flags.0?true fullscreen:flags.1?true peer:InputPeer random_id:bytes = Bool;
messages.reportSponsoredMessage#1af3dbb8 peer:InputPeer random_id:bytes option:bytes = channels.SponsoredMessageReportResult;
messages.getSponsoredMessages#9bd2f439 peer:InputPeer = messages.SponsoredMessages;
+messages.savePreparedInlineMessage#f21f7f2f flags:# result:InputBotInlineResult user_id:InputUser peer_types:flags.0?Vector = messages.BotPreparedInlineMessage;
+messages.getPreparedInlineMessage#857ebdb8 bot:InputUser id:string = messages.PreparedInlineMessage;
messages.getWebViewResult#22b6c214 peer:InputPeer bot:InputUser query_id:long = messages.WebViewResult;
messages.forwardMessage#33963bf9 peer:InputPeer id:int random_id:long = Updates;
-messages.checkDownloadFileParams#50077589 bot:InputUser file_name:string url:string = Bool;
-messages.toggleUserEmojiStatusPermission#6de6392 bot:InputUser enabled:Bool = Bool;
messages.getStatsURL#812c2ae6 flags:# dark:flags.0?true peer:InputPeer params:string = StatsURL;
-messages.getPreparedInlineMessage#857ebdb8 bot:InputUser id:string = messages.PreparedInlineMessage;
messages.getAllChats#875f74be except_ids:Vector = messages.Chats;
messages.sendEncryptedMultiMedia#cacacaca = messages.SentEncryptedMessage;
messages.setWebViewResult#e41cd11d query_id:long = Bool;
-messages.savePreparedInlineMessage#f21f7f2f flags:# result:InputBotInlineResult user_id:InputUser peer_types:flags.0?Vector = messages.BotPreparedInlineMessage;
updates.getState#edd4882a = updates.State;
updates.getDifference#19c2f763 flags:# pts:int pts_limit:flags.1?int pts_total_limit:flags.0?int date:int qts:int qts_limit:flags.2?int = updates.Difference;
@@ -2480,6 +2487,8 @@ bots.reorderPreviewMedias#b627f3aa bot:InputUser lang_code:string order:Vector;
bots.updateUserEmojiStatus#ed9f30c5 user_id:InputUser emoji_status:EmojiStatus = Bool;
+bots.toggleUserEmojiStatusPermission#6de6392 bot:InputUser enabled:Bool = Bool;
+bots.checkDownloadFileParams#50077589 bot:InputUser file_name:string url:string = Bool;
payments.getPaymentForm#37148dbb flags:# invoice:InputInvoice theme_params:flags.0?DataJSON = payments.PaymentForm;
payments.getPaymentReceipt#2478d1cc peer:InputPeer msg_id:int = payments.PaymentReceipt;
@@ -2515,8 +2524,8 @@ payments.getStarGifts#c4563590 hash:int = payments.StarGifts;
payments.getUserStarGifts#5e72c7e1 user_id:InputUser offset:string limit:int = payments.UserStarGifts;
payments.saveStarGift#87acf08e flags:# unsave:flags.0?true user_id:InputUser msg_id:int = Bool;
payments.convertStarGift#421e027 user_id:InputUser msg_id:int = Bool;
+payments.botCancelStarsSubscription#6dfa0622 flags:# restore:flags.0?true user_id:InputUser charge_id:string = Bool;
payments.requestRecurringPayment#146e958d user_id:InputUser recurring_init_charge:string invoice_media:InputMedia = Updates;
-payments.botCancelStarsSubscription#57f9ece6 flags:# restore:flags.0?true user_id:InputUser invoice_slug:flags.1?string charge_id:flags.2?string = Bool;
stickers.createStickerSet#9021ab67 flags:# masks:flags.0?true emojis:flags.5?true text_color:flags.6?true user_id:InputUser title:string short_name:string thumb:flags.2?InputDocument stickers:Vector software:flags.3?string = messages.StickerSet;
stickers.removeStickerFromSet#f7760f51 sticker:InputDocument = messages.StickerSet;
@@ -2637,4 +2646,4 @@ smsjobs.finishJob#4f1ebf24 flags:# job_id:string error:flags.0?string = Bool;
fragment.getCollectibleInfo#be1e85ba collectible:InputCollectible = fragment.CollectibleInfo;
-// LAYER 193
\ No newline at end of file
+// LAYER 194
\ No newline at end of file
From 86c66e5a91ecac8252f98062bfde6cdc6d30eba0 Mon Sep 17 00:00:00 2001
From: nick <64551534+null-nick@users.noreply.github.com>
Date: Sat, 23 Nov 2024 18:57:24 +0100
Subject: [PATCH 32/78] Version Bump
---
pyrogram/__init__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyrogram/__init__.py b/pyrogram/__init__.py
index e548f441..c01be671 100644
--- a/pyrogram/__init__.py
+++ b/pyrogram/__init__.py
@@ -16,7 +16,7 @@
# You should have received a copy of the GNU Lesser General Public License
# along with Pyrogram. If not, see .
-__version__ = "2.1.5"
+__version__ = "2.1.6"
__license__ = "GNU Lesser General Public License v3.0 (LGPL-3.0)"
__copyright__ = "Copyright (C) 2017-present Dan "
From 893cbe2daf7ef434d98e15fb268ca58401fd4f7b Mon Sep 17 00:00:00 2001
From: nick <64551534+null-nick@users.noreply.github.com>
Date: Fri, 29 Nov 2024 20:42:55 +0100
Subject: [PATCH 33/78] Update API scheme to layer 195.
---
compiler/api/source/main_api.tl | 40 +++++++++++++++++++++------------
1 file changed, 26 insertions(+), 14 deletions(-)
diff --git a/compiler/api/source/main_api.tl b/compiler/api/source/main_api.tl
index 6928f8ed..11435d55 100644
--- a/compiler/api/source/main_api.tl
+++ b/compiler/api/source/main_api.tl
@@ -81,8 +81,6 @@ inputPhotoLegacyFileLocation#d83466f3 id:long access_hash:long file_reference:by
inputPeerPhotoFileLocation#37257e99 flags:# big:flags.0?true peer:InputPeer photo_id:long = InputFileLocation;
inputStickerSetThumb#9d84f3db stickerset:InputStickerSet thumb_version:int = InputFileLocation;
inputGroupCallStream#598a92a flags:# call:InputGroupCall time_ms:long scale:int video_channel:flags.0?int video_quality:flags.0?int = InputFileLocation;
-inputPeerPhotoFileLocationLegacy#27d69997 flags:# big:flags.0?true peer:InputPeer volume_id:long local_id:int = InputFileLocation;
-inputStickerSetThumbLegacy#dbaeae9 stickerset:InputStickerSet volume_id:long local_id:int = InputFileLocation;
peerUser#59511722 user_id:long = Peer;
peerChat#36c6019a chat_id:long = Peer;
@@ -261,7 +259,7 @@ inputReportReasonFake#f5ddd6e7 = ReportReason;
inputReportReasonIllegalDrugs#a8eb2be = ReportReason;
inputReportReasonPersonalDetails#9ec7863d = ReportReason;
-userFull#1f58e369 flags:# blocked:flags.0?true phone_calls_available:flags.4?true phone_calls_private:flags.5?true can_pin_message:flags.7?true has_scheduled:flags.12?true video_calls_available:flags.13?true voice_messages_forbidden:flags.20?true translations_disabled:flags.23?true stories_pinned_available:flags.26?true blocked_my_stories_from:flags.27?true wallpaper_overridden:flags.28?true contact_require_premium:flags.29?true read_dates_private:flags.30?true flags2:# sponsored_enabled:flags2.7?true can_view_revenue:flags2.9?true bot_can_manage_emoji_status:flags2.10?true id:long about:flags.1?string settings:PeerSettings personal_photo:flags.21?Photo profile_photo:flags.2?Photo fallback_photo:flags.22?Photo notify_settings:PeerNotifySettings bot_info:flags.3?BotInfo pinned_msg_id:flags.6?int common_chats_count:int folder_id:flags.11?int ttl_period:flags.14?int theme_emoticon:flags.15?string private_forward_name:flags.16?string bot_group_admin_rights:flags.17?ChatAdminRights bot_broadcast_admin_rights:flags.18?ChatAdminRights premium_gifts:flags.19?Vector wallpaper:flags.24?WallPaper stories:flags.25?PeerStories business_work_hours:flags2.0?BusinessWorkHours business_location:flags2.1?BusinessLocation business_greeting_message:flags2.2?BusinessGreetingMessage business_away_message:flags2.3?BusinessAwayMessage business_intro:flags2.4?BusinessIntro birthday:flags2.5?Birthday personal_channel_id:flags2.6?long personal_channel_message:flags2.6?int stargifts_count:flags2.8?int = UserFull;
+userFull#979d2376 flags:# blocked:flags.0?true phone_calls_available:flags.4?true phone_calls_private:flags.5?true can_pin_message:flags.7?true has_scheduled:flags.12?true video_calls_available:flags.13?true voice_messages_forbidden:flags.20?true translations_disabled:flags.23?true stories_pinned_available:flags.26?true blocked_my_stories_from:flags.27?true wallpaper_overridden:flags.28?true contact_require_premium:flags.29?true read_dates_private:flags.30?true flags2:# sponsored_enabled:flags2.7?true can_view_revenue:flags2.9?true bot_can_manage_emoji_status:flags2.10?true id:long about:flags.1?string settings:PeerSettings personal_photo:flags.21?Photo profile_photo:flags.2?Photo fallback_photo:flags.22?Photo notify_settings:PeerNotifySettings bot_info:flags.3?BotInfo pinned_msg_id:flags.6?int common_chats_count:int folder_id:flags.11?int ttl_period:flags.14?int theme_emoticon:flags.15?string private_forward_name:flags.16?string bot_group_admin_rights:flags.17?ChatAdminRights bot_broadcast_admin_rights:flags.18?ChatAdminRights premium_gifts:flags.19?Vector wallpaper:flags.24?WallPaper stories:flags.25?PeerStories business_work_hours:flags2.0?BusinessWorkHours business_location:flags2.1?BusinessLocation business_greeting_message:flags2.2?BusinessGreetingMessage business_away_message:flags2.3?BusinessAwayMessage business_intro:flags2.4?BusinessIntro birthday:flags2.5?Birthday personal_channel_id:flags2.6?long personal_channel_message:flags2.6?int stargifts_count:flags2.8?int starref_program:flags2.11?StarRefProgram = UserFull;
contact#145ade0b user_id:long mutual:Bool = Contact;
@@ -448,7 +446,7 @@ updateBotEditBusinessMessage#7df587c flags:# connection_id:string message:Messag
updateBotDeleteBusinessMessage#a02a982e connection_id:string peer:Peer messages:Vector qts:int = Update;
updateNewStoryReaction#1824e40b story_id:int peer:Peer reaction:Reaction = Update;
updateBroadcastRevenueTransactions#dfd961f5 peer:Peer balances:BroadcastRevenueBalances = Update;
-updateStarsBalance#fb85198 balance:long = Update;
+updateStarsBalance#4e80a379 balance:StarsAmount = Update;
updateBusinessBotCallbackQuery#1ea2fda7 flags:# query_id:long user_id:long connection_id:string message:Message reply_to_message:flags.2?Message chat_instance:long data:flags.0?bytes = Update;
updateStarsRevenueStatus#a584b019 peer:Peer status:StarsRevenueStatus = Update;
updateBotPurchasedPaidMedia#283bd312 user_id:long payload:string qts:int = Update;
@@ -952,7 +950,7 @@ inputWebFileAudioAlbumThumbLocation#f46fe924 flags:# small:flags.2?true document
upload.webFile#21e753bc size:int mime_type:string file_type:storage.FileType mtime:int bytes:bytes = upload.WebFile;
payments.paymentForm#a0058751 flags:# can_save_credentials:flags.2?true password_missing:flags.3?true form_id:long bot_id:long title:string description:string photo:flags.5?WebDocument invoice:Invoice provider_id:long url:string native_provider:flags.4?string native_params:flags.4?DataJSON additional_methods:flags.6?Vector saved_info:flags.0?PaymentRequestedInfo saved_credentials:flags.1?Vector users:Vector = payments.PaymentForm;
-payments.paymentFormStars#7bf6b15c flags:# can_save_credentials:flags.2?true form_id:long password_missing:flags.3?true bot_id:long title:string description:string photo:flags.5?WebDocument invoice:Invoice users:Vector = payments.PaymentForm;
+payments.paymentFormStars#7bf6b15c flags:# can_save_credentials:flags.2?true password_missing:flags.3?true form_id:long bot_id:long title:string description:string photo:flags.5?WebDocument invoice:Invoice users:Vector = payments.PaymentForm;
payments.paymentFormStarGift#b425cfe1 form_id:long invoice:Invoice = payments.PaymentForm;
payments.validatedRequestedInfo#d1451883 flags:# id:flags.0?string shipping_options:flags.1?Vector = payments.ValidatedRequestedInfo;
@@ -1865,9 +1863,9 @@ starsTransactionPeerAPI#f9677aad = StarsTransactionPeer;
starsTopupOption#bd915c0 flags:# extended:flags.1?true stars:long store_product:flags.0?string currency:string amount:long = StarsTopupOption;
-starsTransaction#35d4f276 flags:# refund:flags.3?true pending:flags.4?true failed:flags.6?true gift:flags.10?true reaction:flags.11?true subscription:flags.12?true id:string floodskip:flags.15?true stars:long date:int peer:StarsTransactionPeer title:flags.0?string description:flags.1?string photo:flags.2?WebDocument transaction_date:flags.5?int transaction_url:flags.5?string bot_payload:flags.7?bytes msg_id:flags.8?int extended_media:flags.9?Vector subscription_period:flags.12?int giveaway_post_id:flags.13?int stargift:flags.14?StarGift floodskip_number:flags.15?int = StarsTransaction;
+starsTransaction#64dfc926 flags:# refund:flags.3?true pending:flags.4?true failed:flags.6?true gift:flags.10?true reaction:flags.11?true subscription:flags.12?true floodskip:flags.15?true id:string stars:StarsAmount date:int peer:StarsTransactionPeer title:flags.0?string description:flags.1?string photo:flags.2?WebDocument transaction_date:flags.5?int transaction_url:flags.5?string bot_payload:flags.7?bytes msg_id:flags.8?int extended_media:flags.9?Vector subscription_period:flags.12?int giveaway_post_id:flags.13?int stargift:flags.14?StarGift floodskip_number:flags.15?int starref_commission_permille:flags.16?int starref_peer:flags.17?Peer starref_amount:flags.17?StarsAmount = StarsTransaction;
-payments.starsStatus#bbfa316c flags:# balance:long subscriptions:flags.1?Vector subscriptions_next_offset:flags.2?string subscriptions_missing_balance:flags.4?long history:flags.3?Vector next_offset:flags.0?string chats:Vector users:Vector = payments.StarsStatus;
+payments.starsStatus#6c9ce8ed flags:# balance:StarsAmount subscriptions:flags.1?Vector subscriptions_next_offset:flags.2?string subscriptions_missing_balance:flags.4?long history:flags.3?Vector next_offset:flags.0?string chats:Vector users:Vector = payments.StarsStatus;
foundStory#e87acbc0 peer:Peer story:StoryItem = FoundStory;
@@ -1924,22 +1922,28 @@ messages.preparedInlineMessage#ff57708d query_id:long result:BotInlineResult pee
botAppSettings#c99b1950 flags:# placeholder_path:flags.0?bytes background_color:flags.1?int background_dark_color:flags.2?int header_color:flags.3?int header_dark_color:flags.4?int = BotAppSettings;
+connectedBotStarRef#19a13f71 flags:# revoked:flags.1?true url:string date:int bot_id:long commission_permille:int duration_months:flags.0?int participants:long revenue:long = ConnectedBotStarRef;
+
appWebViewResultUrl#3c1b4f0d url:string = AppWebViewResultUrl;
messages.messageEmpty#3f4e0648 = messages.MessageEmpty;
+messages.foundStickersNotModified#6010c534 flags:# next_offset:flags.0?int = messages.FoundStickers;
+messages.foundStickers#82c9e290 flags:# next_offset:flags.0?int hash:long stickers:Vector = messages.FoundStickers;
+
fileLocationUnavailable#7c596b46 volume_id:long local_id:int secret:long = FileLocation;
simpleWebViewResultUrl#882f76bb url:string = SimpleWebViewResultUrl;
+connectedStarRefBots#98d5ea1d count:int connected_bots:Vector users:Vector = ConnectedStarRefBots;
+
messages.webViewResult#aadf159b result:BotInlineResult users:Vector = messages.WebViewResult;
-ipPortSecret#37982646 ipv4:int port:int secret:bytes = IpPort;
-ipPort#d433ad73 ipv4:int port:int = IpPort;
+suggestedStarRefBots#b4d5d859 flags:# count:int suggested_bots:Vector users:Vector next_offset:flags.0?string = SuggestedStarRefBots;
-accessPointRule#4679b65f phone_prefix_rules:string dc_id:int ips:vector = AccessPointRule;
+starsAmount#bbb6b4a3 amount:long nanos:int = StarsAmount;
-help.configSimple#5a592a6c date:int expires:int rules:vector = help.ConfigSimple;
+starRefProgram#dd0c66f2 flags:# bot_id:long commission_permille:int duration_months:flags.0?int end_date:flags.1?int daily_revenue_per_user:flags.2?StarsAmount = StarRefProgram;
---functions---
@@ -2106,7 +2110,7 @@ contacts.block#2e2e8734 flags:# my_stories_from:flags.0?true id:InputPeer = Bool
contacts.unblock#b550d328 flags:# my_stories_from:flags.0?true id:InputPeer = Bool;
contacts.getBlocked#9a868f80 flags:# my_stories_from:flags.0?true offset:int limit:int = contacts.Blocked;
contacts.search#11f812d8 q:string limit:int = contacts.Found;
-contacts.resolveUsername#f93ccba3 username:string = contacts.ResolvedPeer;
+contacts.resolveUsername#725afbbc flags:# username:string referer:flags.0?string = contacts.ResolvedPeer;
contacts.getTopPeers#973478b6 flags:# correspondents:flags.0?true bots_pm:flags.1?true bots_inline:flags.2?true phone_calls:flags.3?true forward_users:flags.4?true forward_chats:flags.5?true groups:flags.10?true channels:flags.15?true bots_app:flags.16?true offset:int limit:int hash:long = contacts.TopPeers;
contacts.resetTopPeerRating#1ae373ac category:TopPeerCategory peer:InputPeer = Bool;
contacts.resetSaved#879537f1 = Bool;
@@ -2349,11 +2353,19 @@ messages.getSponsoredMessages#9bd2f439 peer:InputPeer = messages.SponsoredMessag
messages.savePreparedInlineMessage#f21f7f2f flags:# result:InputBotInlineResult user_id:InputUser peer_types:flags.0?Vector = messages.BotPreparedInlineMessage;
messages.getPreparedInlineMessage#857ebdb8 bot:InputUser id:string = messages.PreparedInlineMessage;
messages.getWebViewResult#22b6c214 peer:InputPeer bot:InputUser query_id:long = messages.WebViewResult;
+messages.searchStickers#29b1c66a flags:# emojis:flags.0?true q:string lang_code:Vector offset:int limit:int hash:long = messages.FoundStickers;
messages.forwardMessage#33963bf9 peer:InputPeer id:int random_id:long = Updates;
+messages.getConnectedStarRefBots#5869a553 flags:# peer:InputPeer offset_date:flags.2?int offset_link:flags.2?string limit:int = ConnectedStarRefBots;
+messages.updateStarRefProgram#778b5ab3 flags:# bot:InputUser commission_permille:int duration_months:flags.0?int = StarRefProgram;
+messages.connectStarRefBot#7ed5348a peer:InputPeer bot:InputUser = ConnectedStarRefBots;
messages.getStatsURL#812c2ae6 flags:# dark:flags.0?true peer:InputPeer params:string = StatsURL;
messages.getAllChats#875f74be except_ids:Vector = messages.Chats;
+messages.getAdminedBots#b0711d83 = Vector;
+messages.getConnectedStarRefBot#b7d998f0 peer:InputPeer bot:InputUser = ConnectedStarRefBots;
messages.sendEncryptedMultiMedia#cacacaca = messages.SentEncryptedMessage;
+messages.getSuggestedStarRefBots#d6b48f7 flags:# order_by_revenue:flags.0?true order_by_date:flags.1?true peer:InputPeer offset:string limit:int = SuggestedStarRefBots;
messages.setWebViewResult#e41cd11d query_id:long = Bool;
+messages.editConnectedStarRefBot#e4fca4a3 flags:# revoked:flags.0?true peer:InputPeer link:string = ConnectedStarRefBots;
updates.getState#edd4882a = updates.State;
updates.getDifference#19c2f763 flags:# pts:int pts_limit:flags.1?int pts_total_limit:flags.0?int date:int qts:int qts_limit:flags.2?int = updates.Difference;
@@ -2524,7 +2536,7 @@ payments.getStarGifts#c4563590 hash:int = payments.StarGifts;
payments.getUserStarGifts#5e72c7e1 user_id:InputUser offset:string limit:int = payments.UserStarGifts;
payments.saveStarGift#87acf08e flags:# unsave:flags.0?true user_id:InputUser msg_id:int = Bool;
payments.convertStarGift#421e027 user_id:InputUser msg_id:int = Bool;
-payments.botCancelStarsSubscription#6dfa0622 flags:# restore:flags.0?true user_id:InputUser charge_id:string = Bool;
+payments.botCancelStarsSubscription#57f9ece6 flags:# restore:flags.0?true user_id:InputUser invoice_slug:flags.1?string charge_id:flags.2?string = Bool;
payments.requestRecurringPayment#146e958d user_id:InputUser recurring_init_charge:string invoice_media:InputMedia = Updates;
stickers.createStickerSet#9021ab67 flags:# masks:flags.0?true emojis:flags.5?true text_color:flags.6?true user_id:InputUser title:string short_name:string thumb:flags.2?InputDocument stickers:Vector software:flags.3?string = messages.StickerSet;
@@ -2646,4 +2658,4 @@ smsjobs.finishJob#4f1ebf24 flags:# job_id:string error:flags.0?string = Bool;
fragment.getCollectibleInfo#be1e85ba collectible:InputCollectible = fragment.CollectibleInfo;
-// LAYER 194
\ No newline at end of file
+// LAYER 195
\ No newline at end of file
From a04d1b858983132ecccbe56e5e165eb25dbfce58 Mon Sep 17 00:00:00 2001
From: nick <64551534+null-nick@users.noreply.github.com>
Date: Fri, 29 Nov 2024 23:44:48 +0100
Subject: [PATCH 34/78] Update API scheme to layer 195. (v2)
---
compiler/api/source/main_api.tl | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/compiler/api/source/main_api.tl b/compiler/api/source/main_api.tl
index 11435d55..4ffe4682 100644
--- a/compiler/api/source/main_api.tl
+++ b/compiler/api/source/main_api.tl
@@ -81,6 +81,8 @@ inputPhotoLegacyFileLocation#d83466f3 id:long access_hash:long file_reference:by
inputPeerPhotoFileLocation#37257e99 flags:# big:flags.0?true peer:InputPeer photo_id:long = InputFileLocation;
inputStickerSetThumb#9d84f3db stickerset:InputStickerSet thumb_version:int = InputFileLocation;
inputGroupCallStream#598a92a flags:# call:InputGroupCall time_ms:long scale:int video_channel:flags.0?int video_quality:flags.0?int = InputFileLocation;
+inputPeerPhotoFileLocationLegacy#27d69997 flags:# big:flags.0?true peer:InputPeer volume_id:long local_id:int = InputFileLocation;
+inputStickerSetThumbLegacy#dbaeae9 stickerset:InputStickerSet volume_id:long local_id:int = InputFileLocation;
peerUser#59511722 user_id:long = Peer;
peerChat#36c6019a chat_id:long = Peer;
@@ -1873,7 +1875,7 @@ stories.foundStories#e2de7737 flags:# count:int stories:Vector next_
geoPointAddress#de4c5d93 flags:# country_iso2:string state:flags.0?string city:flags.1?string street:flags.2?string = GeoPointAddress;
-starsRevenueStatus#79342946 flags:# withdrawal_enabled:flags.0?true current_balance:long available_balance:long overall_revenue:long next_withdrawal_at:flags.1?int = StarsRevenueStatus;
+starsRevenueStatus#febe5491 flags:# withdrawal_enabled:flags.0?true current_balance:StarsAmount available_balance:StarsAmount overall_revenue:StarsAmount next_withdrawal_at:flags.1?int = StarsRevenueStatus;
payments.starsRevenueStats#c92bb73b revenue_graph:StatsGraph status:StarsRevenueStatus usd_rate:double = payments.StarsRevenueStats;
@@ -1922,6 +1924,13 @@ messages.preparedInlineMessage#ff57708d query_id:long result:BotInlineResult pee
botAppSettings#c99b1950 flags:# placeholder_path:flags.0?bytes background_color:flags.1?int background_dark_color:flags.2?int header_color:flags.3?int header_dark_color:flags.4?int = BotAppSettings;
+ipPortSecret#37982646 ipv4:int port:int secret:bytes = IpPort;
+ipPort#d433ad73 ipv4:int port:int = IpPort;
+
+accessPointRule#4679b65f phone_prefix_rules:string dc_id:int ips:vector = AccessPointRule;
+
+help.configSimple#5a592a6c date:int expires:int rules:vector = help.ConfigSimple;
+
connectedBotStarRef#19a13f71 flags:# revoked:flags.1?true url:string date:int bot_id:long commission_permille:int duration_months:flags.0?int participants:long revenue:long = ConnectedBotStarRef;
appWebViewResultUrl#3c1b4f0d url:string = AppWebViewResultUrl;
@@ -2353,7 +2362,7 @@ messages.getSponsoredMessages#9bd2f439 peer:InputPeer = messages.SponsoredMessag
messages.savePreparedInlineMessage#f21f7f2f flags:# result:InputBotInlineResult user_id:InputUser peer_types:flags.0?Vector = messages.BotPreparedInlineMessage;
messages.getPreparedInlineMessage#857ebdb8 bot:InputUser id:string = messages.PreparedInlineMessage;
messages.getWebViewResult#22b6c214 peer:InputPeer bot:InputUser query_id:long = messages.WebViewResult;
-messages.searchStickers#29b1c66a flags:# emojis:flags.0?true q:string lang_code:Vector offset:int limit:int hash:long = messages.FoundStickers;
+messages.searchStickers#29b1c66a flags:# emojis:flags.0?true q:string emoticon:string lang_code:Vector offset:int limit:int hash:long = messages.FoundStickers;
messages.forwardMessage#33963bf9 peer:InputPeer id:int random_id:long = Updates;
messages.getConnectedStarRefBots#5869a553 flags:# peer:InputPeer offset_date:flags.2?int offset_link:flags.2?string limit:int = ConnectedStarRefBots;
messages.updateStarRefProgram#778b5ab3 flags:# bot:InputUser commission_permille:int duration_months:flags.0?int = StarRefProgram;
@@ -2536,7 +2545,7 @@ payments.getStarGifts#c4563590 hash:int = payments.StarGifts;
payments.getUserStarGifts#5e72c7e1 user_id:InputUser offset:string limit:int = payments.UserStarGifts;
payments.saveStarGift#87acf08e flags:# unsave:flags.0?true user_id:InputUser msg_id:int = Bool;
payments.convertStarGift#421e027 user_id:InputUser msg_id:int = Bool;
-payments.botCancelStarsSubscription#57f9ece6 flags:# restore:flags.0?true user_id:InputUser invoice_slug:flags.1?string charge_id:flags.2?string = Bool;
+payments.botCancelStarsSubscription#6dfa0622 flags:# restore:flags.0?true user_id:InputUser charge_id:string = Bool;
payments.requestRecurringPayment#146e958d user_id:InputUser recurring_init_charge:string invoice_media:InputMedia = Updates;
stickers.createStickerSet#9021ab67 flags:# masks:flags.0?true emojis:flags.5?true text_color:flags.6?true user_id:InputUser title:string short_name:string thumb:flags.2?InputDocument stickers:Vector software:flags.3?string = messages.StickerSet;
From b158b28f8afa863a19640d67842d9d075e0a232f Mon Sep 17 00:00:00 2001
From: Nick <64551534+null-nick@users.noreply.github.com>
Date: Thu, 5 Dec 2024 12:57:26 +0100
Subject: [PATCH 35/78] Update API scheme to layer 195. (v3)
---
compiler/api/source/main_api.tl | 49 ++++++++++++---------------------
1 file changed, 17 insertions(+), 32 deletions(-)
diff --git a/compiler/api/source/main_api.tl b/compiler/api/source/main_api.tl
index 4ffe4682..daa83f5e 100644
--- a/compiler/api/source/main_api.tl
+++ b/compiler/api/source/main_api.tl
@@ -81,8 +81,6 @@ inputPhotoLegacyFileLocation#d83466f3 id:long access_hash:long file_reference:by
inputPeerPhotoFileLocation#37257e99 flags:# big:flags.0?true peer:InputPeer photo_id:long = InputFileLocation;
inputStickerSetThumb#9d84f3db stickerset:InputStickerSet thumb_version:int = InputFileLocation;
inputGroupCallStream#598a92a flags:# call:InputGroupCall time_ms:long scale:int video_channel:flags.0?int video_quality:flags.0?int = InputFileLocation;
-inputPeerPhotoFileLocationLegacy#27d69997 flags:# big:flags.0?true peer:InputPeer volume_id:long local_id:int = InputFileLocation;
-inputStickerSetThumbLegacy#dbaeae9 stickerset:InputStickerSet volume_id:long local_id:int = InputFileLocation;
peerUser#59511722 user_id:long = Peer;
peerChat#36c6019a chat_id:long = Peer;
@@ -125,7 +123,6 @@ channelFull#bbab348d flags:# can_view_participants:flags.3?true can_set_username
chatParticipant#c02d4007 user_id:long inviter_id:long date:int = ChatParticipant;
chatParticipantCreator#e46bcee4 user_id:long = ChatParticipant;
chatParticipantAdmin#a0933f5b user_id:long inviter_id:long date:int = ChatParticipant;
-chatChannelParticipant#c8d7493e = ChatParticipant;
chatParticipantsForbidden#8763d3e1 flags:# chat_id:long self_participant:flags.0?ChatParticipant = ChatParticipants;
chatParticipants#3cbc93f8 chat_id:long participants:Vector version:int = ChatParticipants;
@@ -208,8 +205,6 @@ messageActionUserUpdatedPhoto#55555551 new_user_photo:UserProfilePhoto = Message
messageActionTTLChange#55555552 ttl:int = MessageAction;
messageActionCreatedBroadcastList#55555557 = MessageAction;
messageActionLoginUnknownLocation#555555f5 title:string address:string = MessageAction;
-messageActionSetSameChatWallPaper#c0787d6d wallpaper:WallPaper = MessageAction;
-messageActionAttachMenuBotAllowed#e7e75f97 = MessageAction;
dialog#d58a08c6 flags:# pinned:flags.2?true unread_mark:flags.3?true view_forum_as_messages:flags.6?true peer:Peer top_message:int read_inbox_max_id:int read_outbox_max_id:int unread_count:int unread_mentions_count:int unread_reactions_count:int notify_settings:PeerNotifySettings pts:flags.0?int draft:flags.1?DraftMessage folder_id:flags.4?int ttl_period:flags.5?int = Dialog;
dialogFolder#71bd134c flags:# pinned:flags.2?true folder:Folder peer:Peer top_message:int unread_muted_peers_count:int unread_unmuted_peers_count:int unread_muted_messages_count:int unread_unmuted_messages_count:int = Dialog;
@@ -455,7 +450,6 @@ updateBotPurchasedPaidMedia#283bd312 user_id:long payload:string qts:int = Updat
updatePaidReactionPrivacy#51ca7aec private:Bool = Update;
updateBotSubscriptionExpire#2d13c6ee user_id:long payload:string invoice_slug:string until_date:int qts:int = Update;
updateTranscribeAudio#88617090 flags:# final:flags.0?true transcription_id:long text:string = Update;
-updateUserPhoto#f227868c user_id:long date:int photo:UserProfilePhoto previous:Bool = Update;
updates.state#a56c2a3e pts:int qts:int date:int seq:int unread_count:int = updates.State;
@@ -1057,8 +1051,6 @@ channelAdminLogEventActionChangeEmojiStatus#3ea9feb1 prev_value:EmojiStatus new_
channelAdminLogEventActionChangeEmojiStickerSet#46d840ab prev_stickerset:InputStickerSet new_stickerset:InputStickerSet = ChannelAdminLogEventAction;
channelAdminLogEventActionToggleSignatureProfiles#60a79c79 new_value:Bool = ChannelAdminLogEventAction;
channelAdminLogEventActionParticipantSubExtend#64642db3 prev_participant:ChannelParticipant new_participant:ChannelParticipant = ChannelAdminLogEventAction;
-channelAdminLogEventActionChangeColor#3c2b247b prev_value:int new_value:int = ChannelAdminLogEventAction;
-channelAdminLogEventActionChangeBackgroundEmoji#445fc434 prev_value:long new_value:long = ChannelAdminLogEventAction;
channelAdminLogEventActionChangeTheme#fe69018d prev_value:string new_value:string = ChannelAdminLogEventAction;
channelAdminLogEvent#1fad68cd id:long date:int user_id:long action:ChannelAdminLogEventAction = ChannelAdminLogEvent;
@@ -1924,6 +1916,8 @@ messages.preparedInlineMessage#ff57708d query_id:long result:BotInlineResult pee
botAppSettings#c99b1950 flags:# placeholder_path:flags.0?bytes background_color:flags.1?int background_dark_color:flags.2?int header_color:flags.3?int header_dark_color:flags.4?int = BotAppSettings;
+connectedBotStarRef#19a13f71 flags:# revoked:flags.1?true url:string date:int bot_id:long commission_permille:int duration_months:flags.0?int participants:long revenue:long = ConnectedBotStarRef;
+
ipPortSecret#37982646 ipv4:int port:int secret:bytes = IpPort;
ipPort#d433ad73 ipv4:int port:int = IpPort;
@@ -1931,29 +1925,21 @@ accessPointRule#4679b65f phone_prefix_rules:string dc_id:int ips:vector
help.configSimple#5a592a6c date:int expires:int rules:vector = help.ConfigSimple;
-connectedBotStarRef#19a13f71 flags:# revoked:flags.1?true url:string date:int bot_id:long commission_permille:int duration_months:flags.0?int participants:long revenue:long = ConnectedBotStarRef;
-
-appWebViewResultUrl#3c1b4f0d url:string = AppWebViewResultUrl;
-
-messages.messageEmpty#3f4e0648 = messages.MessageEmpty;
-
messages.foundStickersNotModified#6010c534 flags:# next_offset:flags.0?int = messages.FoundStickers;
messages.foundStickers#82c9e290 flags:# next_offset:flags.0?int hash:long stickers:Vector = messages.FoundStickers;
-fileLocationUnavailable#7c596b46 volume_id:long local_id:int secret:long = FileLocation;
+payments.connectedStarRefBots#98d5ea1d count:int connected_bots:Vector users:Vector = payments.ConnectedStarRefBots;
-simpleWebViewResultUrl#882f76bb url:string = SimpleWebViewResultUrl;
-
-connectedStarRefBots#98d5ea1d count:int connected_bots:Vector users:Vector = ConnectedStarRefBots;
-
-messages.webViewResult#aadf159b result:BotInlineResult users:Vector = messages.WebViewResult;
-
-suggestedStarRefBots#b4d5d859 flags:# count:int suggested_bots:Vector users:Vector next_offset:flags.0?string = SuggestedStarRefBots;
+payments.suggestedStarRefBots#b4d5d859 flags:# count:int suggested_bots:Vector users:Vector next_offset:flags.0?string = payments.SuggestedStarRefBots;
starsAmount#bbb6b4a3 amount:long nanos:int = StarsAmount;
starRefProgram#dd0c66f2 flags:# bot_id:long commission_permille:int duration_months:flags.0?int end_date:flags.1?int daily_revenue_per_user:flags.2?StarsAmount = StarRefProgram;
+messages.messageEmpty#3f4e0648 = messages.MessageEmpty;
+
+messages.webViewResult#aadf159b result:BotInlineResult users:Vector = messages.WebViewResult;
+
---functions---
invokeAfterMsg#cb9f372d {X:Type} msg_id:long query:!X = X;
@@ -2361,20 +2347,13 @@ messages.reportSponsoredMessage#1af3dbb8 peer:InputPeer random_id:bytes option:b
messages.getSponsoredMessages#9bd2f439 peer:InputPeer = messages.SponsoredMessages;
messages.savePreparedInlineMessage#f21f7f2f flags:# result:InputBotInlineResult user_id:InputUser peer_types:flags.0?Vector = messages.BotPreparedInlineMessage;
messages.getPreparedInlineMessage#857ebdb8 bot:InputUser id:string = messages.PreparedInlineMessage;
-messages.getWebViewResult#22b6c214 peer:InputPeer bot:InputUser query_id:long = messages.WebViewResult;
messages.searchStickers#29b1c66a flags:# emojis:flags.0?true q:string emoticon:string lang_code:Vector offset:int limit:int hash:long = messages.FoundStickers;
+messages.getWebViewResult#22b6c214 peer:InputPeer bot:InputUser query_id:long = messages.WebViewResult;
messages.forwardMessage#33963bf9 peer:InputPeer id:int random_id:long = Updates;
-messages.getConnectedStarRefBots#5869a553 flags:# peer:InputPeer offset_date:flags.2?int offset_link:flags.2?string limit:int = ConnectedStarRefBots;
-messages.updateStarRefProgram#778b5ab3 flags:# bot:InputUser commission_permille:int duration_months:flags.0?int = StarRefProgram;
-messages.connectStarRefBot#7ed5348a peer:InputPeer bot:InputUser = ConnectedStarRefBots;
messages.getStatsURL#812c2ae6 flags:# dark:flags.0?true peer:InputPeer params:string = StatsURL;
messages.getAllChats#875f74be except_ids:Vector = messages.Chats;
-messages.getAdminedBots#b0711d83 = Vector;
-messages.getConnectedStarRefBot#b7d998f0 peer:InputPeer bot:InputUser = ConnectedStarRefBots;
messages.sendEncryptedMultiMedia#cacacaca = messages.SentEncryptedMessage;
-messages.getSuggestedStarRefBots#d6b48f7 flags:# order_by_revenue:flags.0?true order_by_date:flags.1?true peer:InputPeer offset:string limit:int = SuggestedStarRefBots;
messages.setWebViewResult#e41cd11d query_id:long = Bool;
-messages.editConnectedStarRefBot#e4fca4a3 flags:# revoked:flags.0?true peer:InputPeer link:string = ConnectedStarRefBots;
updates.getState#edd4882a = updates.State;
updates.getDifference#19c2f763 flags:# pts:int pts_limit:flags.1?int pts_total_limit:flags.0?int date:int qts:int qts_limit:flags.2?int = updates.Difference;
@@ -2420,7 +2399,6 @@ help.getPremiumPromo#b81b93d4 = help.PremiumPromo;
help.getPeerColors#da80f42f hash:int = help.PeerColors;
help.getPeerProfileColors#abcfa9fd hash:int = help.PeerColors;
help.getTimezonesList#49b30240 hash:int = help.TimezonesList;
-help.getAppChangelog#9010ef6f prev_app_version:string = Updates;
channels.readHistory#cc104937 channel:InputChannel max_id:int = Bool;
channels.deleteMessages#84c1fd4e channel:InputChannel id:Vector = messages.AffectedMessages;
@@ -2510,6 +2488,8 @@ bots.getPreviewMedias#a2a5594d bot:InputUser = Vector