Merge branch 'develop' into asyncio-dev

This commit is contained in:
Dan 2020-07-06 16:07:19 +02:00
commit 6d4b2c0bb5
3 changed files with 6 additions and 6 deletions

View File

@ -12,8 +12,8 @@ PHONE_NUMBER_UNOCCUPIED The phone number is not yet being used
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)
TYPE_CONSTRUCTOR_INVALID The type constructor is invalid
FILE_PART_INVALID The file part number is invalid. The value is not between 0 and 2999
FILE_PARTS_INVALID Invalid number of parts. The value is not between 1 and 3000
FILE_PART_INVALID The file part number is invalid. The value is not between 0 and 3999
FILE_PARTS_INVALID Invalid number of parts. The value is not between 1 and 4000
FILE_PART_X_MISSING Part {x} of the file is missing from storage
MD5_CHECKSUM_INVALID The file's checksum did not match the md5_checksum parameter
PHOTO_INVALID_DIMENSIONS The photo dimensions are invalid
@ -144,4 +144,4 @@ FRESH_CHANGE_ADMINS_FORBIDDEN Recently logged-in users cannot change admins
BROADCAST_PUBLIC_VOTERS_FORBIDDEN Polls with public voters cannot be sent in channels
INPUT_FILTER_INVALID The filter is invalid for this query
EMOTICON_EMPTY The emoticon parameter is empty
EMOTICON_INVALID The emoticon parameter is invalid
EMOTICON_INVALID The emoticon parameter is invalid

1 id message
12 USERS_TOO_FEW Not enough users (to create a chat, for example)
13 USERS_TOO_MUCH The maximum number of users has been exceeded (to create a chat, for example)
14 TYPE_CONSTRUCTOR_INVALID The type constructor is invalid
15 FILE_PART_INVALID The file part number is invalid. The value is not between 0 and 2999 The file part number is invalid. The value is not between 0 and 3999
16 FILE_PARTS_INVALID Invalid number of parts. The value is not between 1 and 3000 Invalid number of parts. The value is not between 1 and 4000
17 FILE_PART_X_MISSING Part {x} of the file is missing from storage
18 MD5_CHECKSUM_INVALID The file's checksum did not match the md5_checksum parameter
19 PHOTO_INVALID_DIMENSIONS The photo dimensions are invalid
144 BROADCAST_PUBLIC_VOTERS_FORBIDDEN Polls with public voters cannot be sent in channels
145 INPUT_FILTER_INVALID The filter is invalid for this query
146 EMOTICON_EMPTY The emoticon parameter is empty
147 EMOTICON_INVALID The emoticon parameter is invalid

View File

@ -1787,8 +1787,8 @@ class Client(Methods, BaseClient):
if file_size == 0:
raise ValueError("File size equals to 0 B")
if file_size > 1500 * 1024 * 1024:
raise ValueError("Telegram doesn't support uploading files bigger than 1500 MiB")
if file_size > 2000 * 1024 * 1024:
raise ValueError("Telegram doesn't support uploading files bigger than 2000 MiB")
file_total_parts = int(math.ceil(file_size / part_size))
is_big = file_size > 10 * 1024 * 1024

View File

@ -252,7 +252,7 @@ class Chat(Object):
if full_chat.id == c.id:
chat = c
if isinstance(chat_full, types.ChannelFull):
if isinstance(full_chat, types.ChannelFull):
if full_chat.linked_chat_id == c.id:
linked_chat = c