2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-08-30 05:48:14 +00:00

Merge branch 'develop' into asyncio

This commit is contained in:
Dan 2019-06-20 14:17:58 +02:00
commit 3f261823a7
6 changed files with 15 additions and 8 deletions

View File

@ -105,4 +105,6 @@ MEGAGROUP_PREHISTORY_HIDDEN The action failed because the supergroup has the pre
CHAT_LINK_EXISTS The action failed because the supergroup is linked to a channel
LINK_NOT_MODIFIED The chat link was not modified because you tried to link to the same target
BROADCAST_ID_INVALID The channel is invalid
MEGAGROUP_ID_INVALID The supergroup is invalid
MEGAGROUP_ID_INVALID The supergroup is invalid
BUTTON_DATA_INVALID The button callback data contains invalid data or exceeds 64 bytes
START_PARAM_INVALID The start parameter is invalid
1 id message
105 CHAT_LINK_EXISTS The action failed because the supergroup is linked to a channel
106 LINK_NOT_MODIFIED The chat link was not modified because you tried to link to the same target
107 BROADCAST_ID_INVALID The channel is invalid
108 MEGAGROUP_ID_INVALID The supergroup is invalid
109 BUTTON_DATA_INVALID The button callback data contains invalid data or exceeds 64 bytes
110 START_PARAM_INVALID The start parameter is invalid

View File

@ -1,6 +1,9 @@
Pyrogram FAQ
============
.. role:: strike
:class: strike
This FAQ page provides answers to common questions about Pyrogram and, to some extent, Telegram in general.
.. tip::
@ -102,9 +105,11 @@ one: ``CAADBAADyg4AAvLQYAEYD4F7vcZ43AI``.
Can I use Bot API's file_ids in Pyrogram?
-----------------------------------------
Definitely! All file ids you might have taken from the Bot API are 100% compatible and re-usable in Pyrogram...
:strike:`Definitely! All file ids you might have taken from the Bot API are 100% compatible and re-usable in Pyrogram.`
...at least for now.
Starting from :doc:`Pyrogram v0.14.1 (Layer 100) <releases/v0.14.1>`, the file_id format of all photo-like objects has
changed. Types affected are: :obj:`~pyrogram.Thumbnail`, :obj:`~pyrogram.ChatPhoto` and :obj:`~pyrogram.Photo`. Any
other file id remains compatible with the Bot API.
Telegram is slowly changing some server's internals and it's doing it in such a way that file ids are going to break
inevitably. Not only this, but it seems that the new, hypothetical, file ids could also possibly expire at anytime, thus

View File

@ -29,7 +29,7 @@ Terms
achieve high quality and availability for services.
RPC
Acronym for Remote Procedure call, that is, a function which gets executed at some remote place (i.e. Telegram
Acronym for Remote Procedure Call, that is, a function which gets executed at some remote place (i.e. Telegram
server) and not in your local machine.
RPCError

View File

@ -998,7 +998,7 @@ class Client(Methods, BaseClient):
def load_config(self):
parser = ConfigParser()
parser.read(self.config_file)
parser.read(str(self.config_file))
if self.api_id and self.api_hash:
pass

View File

@ -77,7 +77,7 @@ class FileStorage(MemoryStorage):
if file_exists:
try:
with open(path, encoding="utf-8") as f:
with open(str(path), encoding="utf-8") as f:
session_json = json.load(f)
except ValueError:
pass
@ -98,7 +98,7 @@ class FileStorage(MemoryStorage):
log.warning('Old session file detected: "{}.OLD". You can remove this file now'.format(path.name))
self.conn = sqlite3.connect(
path,
str(path),
timeout=1,
check_same_thread=False
)

View File

@ -46,7 +46,7 @@ class MemoryStorage(Storage):
def create(self):
with self.lock, self.conn:
with open(Path(__file__).parent / "schema.sql", "r") as schema:
with open(str(Path(__file__).parent / "schema.sql"), "r") as schema:
self.conn.executescript(schema.read())
self.conn.execute(