2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-08-29 13:27:47 +00:00

Merge branch 'develop' into asyncio-dev

This commit is contained in:
Dan 2019-08-06 01:02:55 +02:00
commit e96a74f728
4 changed files with 7 additions and 7 deletions

View File

@ -250,8 +250,8 @@ The error in question is ``[400 PEER_ID_INVALID]``, and could mean several thing
About the last point: in order for you to meet a user and thus communicate with them, you should ask yourself how to About the last point: in order for you to meet a user and thus communicate with them, you should ask yourself how to
contact people using official apps. The answer is the same for Pyrogram too and involves normal usages such as searching contact people using official apps. The answer is the same for Pyrogram too and involves normal usages such as searching
for usernames, meet them in a common group, have their phone contacts saved, getting a message mentioning them (either a for usernames, meeting them in a common group, have their phone contacts saved or getting a message mentioning them,
forward or a mention in the message text). either a forward or a mention in the message text.
UnicodeEncodeError: '<encoding>' codec can't encode … UnicodeEncodeError: '<encoding>' codec can't encode …
----------------------------------------------------- -----------------------------------------------------

View File

@ -29,9 +29,9 @@ Configuration
Having the API key from the previous step in handy, we can now begin to configure a Pyrogram project. Having the API key from the previous step in handy, we can now begin to configure a Pyrogram project.
There are two ways to do so, and you can choose what fits better for you: There are two ways to do so, and you can choose what fits better for you:
- First option (recommended): create a new ``config.ini`` file at the root of your working directory, copy-paste the - First option (recommended): create a new ``config.ini`` file next to your main script, copy-paste the following and
following and replace the **api_id** and **api_hash** values with your own. This is the preferred method because replace the **api_id** and **api_hash** values with your own. This is the preferred method because allows you to
allows you to keep your credentials out of your code without having to deal with how to load them: keep your credentials out of your code without having to deal with how to load them:
.. code-block:: ini .. code-block:: ini

View File

@ -153,7 +153,7 @@ class Client(Methods, BaseClient):
workdir (``str``, *optional*): workdir (``str``, *optional*):
Define a custom working directory. The working directory is the location in your filesystem Define a custom working directory. The working directory is the location in your filesystem
where Pyrogram will store your session files. Defaults to "." (current directory). where Pyrogram will store your session files. Defaults to the parent directory of the main script.
config_file (``str``, *optional*): config_file (``str``, *optional*):
Path of the configuration file. Defaults to ./config.ini Path of the configuration file. Defaults to ./config.ini

View File

@ -63,7 +63,7 @@ class InlineQueryResult(Object):
super().__init__() super().__init__()
self.type = type self.type = type
self.id = str(uuid4()) if id is None else id self.id = str(uuid4()) if id is None else str(id)
self.input_message_content = input_message_content self.input_message_content = input_message_content
self.reply_markup = reply_markup self.reply_markup = reply_markup