ColinShark
9a94c8f0af
Add get_common_chats method ( #303 )
...
* Add get_common_chats method
* Return properly formatted list
* Fix small format and docstring issues
2019-08-16 22:33:06 +02:00
Dan
5cfc412af2
Add missing await
2019-08-07 14:08:06 +02:00
Dan
8612eafb4a
Merge develop -> asyncio
2019-08-03 20:23:41 +02:00
Dan
937987a361
Finally remove ports from older schemas and fix export_chat_invite_link
2019-08-03 19:40:45 +02:00
Dan
c6f346f83d
[Bot API 4.4] Update chat permissions
...
- Move can_* permissions back to ChatMember objects
- Rename restrict_chat to set_chat_permissions
- Update restrict_chat_member to accept a single ChatPermissions arg.
- Update ChatPermissions to be the same as the one on the Bot API
2019-08-03 19:30:32 +02:00
Dan
091552e5d9
[Bot API 4.4] Update stickers
...
- Add is_animated field to Sticker
- Remove send_animated_sticker (use send_sticker instead)
- Default to 512x512 in case size is unknown (instead of 0x0)
2019-08-03 18:38:58 +02:00
Dan
1540fd4f22
Merge remote-tracking branch 'origin/asyncio-dev' into asyncio-dev
2019-08-03 10:49:09 +02:00
Dan
7badcd38b4
Merge develop -> asyncio
2019-08-03 10:48:35 +02:00
Dan
6bbd79db86
Update download_media and util methods to work with new file_id formats
2019-08-02 02:33:52 +02:00
Dan
73e8b8c66e
Update read_history.py
2019-08-01 20:18:17 +02:00
Dan
aa135ea457
Reformat project
2019-08-01 19:11:43 +02:00
Dan
ad0f8284f6
Use the correct way to parse peer identifiers
2019-08-01 19:07:08 +02:00
Dan
0f9029202e
Merge develop -> asyncio
2019-07-30 00:06:06 +02:00
Dan
11ea15aa08
Fix yet another compatibility issue with Path objects and Python 3.5
2019-07-28 09:32:35 +02:00
Dan
87bbd764b9
Add better summary for get_messages
2019-07-28 08:54:18 +02:00
Dan
2dec2442e5
Add examples to all available methods
2019-07-25 11:22:14 +02:00
Dan
b2886c21ca
Clarify get_messages error messages
2019-07-25 10:48:36 +02:00
Dan
c0e9b98cab
Add is_gallery parameter to answer_inline_query and InlineQuery.answer
2019-07-21 23:10:23 +02:00
Dan
036a73997a
Add new methods: add_chat_members, create_* and delete_* chats
...
- add_chat_members
- create_group
- create_channel
- create_supergroup
- delete_channel
- delete_supergroup
2019-07-21 23:08:30 +02:00
Dan
6459ce0a07
Fix lots of bound methods breaking due to latest changes on parse_mode
...
Addresses #287
2019-07-21 01:03:19 +02:00
Dan
62a39521d9
Allow send_media_group send media from URLs
2019-07-19 13:40:12 +02:00
Dan
fed8cbf87e
Add new set_parse_mode utility method
2019-07-11 19:28:33 +02:00
Dan
e1197e066e
Use a better name for the special plugin attribute when decorating funcs
2019-07-11 17:14:38 +02:00
Dan
d441f16879
Merge develop -> asyncio
2019-07-11 04:17:46 +02:00
Dan
f9ea45f987
Fix restrict_chat and restrict_chat_member combined permissions
2019-07-11 01:32:18 +02:00
Dan
52b0988af4
Clarify default value of supports_streaming parameter (send_video)
2019-07-10 22:04:57 +02:00
Dan
d119998212
Remove get_user_dc method, add dc_id attribute to User
2019-07-10 20:20:22 +02:00
Dan
e41d21ba29
Add "md" to possible parse modes for Markdown style
2019-07-10 20:03:10 +02:00
Dan
6a62d1b8c4
Fix tiny typo: contact -> contacts
2019-07-09 23:51:43 +02:00
Dan
82efc9a154
Small documentation fix
2019-07-09 19:03:15 +02:00
Dan
2769f5219d
Merge develop -> asyncio
2019-07-04 21:02:33 +02:00
Dan
bdd554575a
Fix export_chat_invite_link not working for bots on channels/supergroups
...
Telegram still hasn't enabled this for bots...
Closes
2019-07-04 21:00:22 +02:00
Dan
ee1f6e2c9f
Fix errors and warnings when using Pyrogram async with Python <3.5.3
2019-07-04 12:57:07 +02:00
Dan
ac4714c0dd
Merge develop -> asyncio
2019-07-02 00:05:51 +02:00
Dan
be3947e20b
Fix some methods not working correctly with the new Text Parser
2019-07-02 00:01:18 +02:00
Dan
b20e0ef2d2
Merge branch 'develop' into asyncio
...
# Conflicts:
# pyrogram/__init__.py
# pyrogram/client/methods/chats/export_chat_invite_link.py
# pyrogram/client/parser/html.py
2019-07-01 14:49:47 +02:00
Dan
580c684cb3
Fix export_chat_invite_link not working correctly (channels/supergroups)
2019-06-30 16:13:10 +02:00
Dan
8c2a971fec
Merge branch 'develop' into asyncio
...
# Conflicts:
# pyrogram/client/methods/messages/send_document.py
2019-06-28 16:31:52 +02:00
Dan
46bf382480
Fix self.parser not calling .parse for send_document
2019-06-28 16:31:32 +02:00
Dan
d8d72395b7
Merge branch 'develop' into asyncio
2019-06-28 11:12:19 +02:00
Dan
40bcd4e59d
Fix delete_profile_photos. Closes #259
2019-06-26 21:43:08 +02:00
Dan
8ef97f2177
Merge branch 'develop' into asyncio
...
# Conflicts:
# pyrogram/client/methods/messages/edit_message_text.py
# pyrogram/client/methods/messages/send_animation.py
# pyrogram/client/methods/messages/send_audio.py
# pyrogram/client/methods/messages/send_cached_media.py
# pyrogram/client/methods/messages/send_document.py
# pyrogram/client/methods/messages/send_message.py
# pyrogram/client/methods/messages/send_photo.py
# pyrogram/client/methods/messages/send_video.py
# pyrogram/client/methods/messages/send_voice.py
# pyrogram/client/parser/html.py
# pyrogram/client/parser/markdown.py
# pyrogram/client/types/input_message_content/input_text_message_content.py
2019-06-26 19:34:49 +02:00
Dan
39e25147bd
Update parse_mode parameter docstrings
2019-06-26 16:36:24 +02:00
Dan
f05e79e0f4
Update usages of Parser all around the library
2019-06-26 16:08:24 +02:00
Dan
1e546099a3
Merge develop -> asyncio
2019-06-23 01:35:53 +02:00
Dan
31f39a00ab
Make plugin callback functions return the function itself when decorated
2019-06-23 01:33:46 +02:00
Dan
84278f9cee
Merge branch 'develop' into asyncio
...
# Conflicts:
# pyrogram/client/ext/dispatcher.py
2019-06-22 00:49:13 +02:00
Dan
b439e44015
Fix tiny typo
2019-06-21 03:43:43 +02:00
Dan
a8dfe61f7e
Merge develop -> asyncio
2019-06-20 04:17:24 +02:00
Dan
30192de1ad
Update pyrogram/client to accommodate Storage Engines
2019-06-19 16:10:37 +02:00
Dan
d472d06c48
Merge branch 'develop' into session_storage
2019-06-19 15:54:52 +02:00
Dan
651b8d891d
Merge pull request #256 from ColinTheShark/develop
...
Add convenience methods to block and unblock Users
2019-06-17 14:43:26 +02:00
ColinShark
1fd31cac1e
Add convenience methods to block and unblock Users
2019-06-17 14:34:49 +02:00
ColinShark
10de006cc5
Add returned object
2019-06-17 09:47:12 +02:00
Dan
142d5ab335
Merge branch 'develop' into session_storage
...
# Conflicts:
# pyrogram/client/client.py
# pyrogram/client/ext/base_client.py
# pyrogram/client/ext/syncer.py
# pyrogram/client/methods/contacts/get_contacts.py
2019-06-15 23:52:34 +02:00
Dan
80d8443be4
Fix script executions not working outside the current directory
...
Fixes #41
2019-06-15 23:02:31 +02:00
Dan
61ed44ff5f
Add edit_inline_* methods to deal with inline messages only
2019-06-14 04:52:05 +02:00
Dan
c485715db1
Small docstrings fixup
2019-06-14 02:47:17 +02:00
Dan
22199b0fe5
Implement editing of messages sent via inline bots
...
- edit_message_text
- edit_message_caption
- edit_message_media
- edit_message_reply_markup
2019-06-14 02:15:33 +02:00
Dan
93082ce894
Reword get_user_dc docstrings
2019-06-12 13:43:28 +02:00
Dan
b86373d28c
Improve get_history_count
2019-06-12 11:43:24 +02:00
Dan
4f2928e7b5
Improve get_profile_photos and get_profile_photos_count
2019-06-12 11:37:43 +02:00
Dan
a21858a262
Merge pull request #251 from pyrogram/types-revamp
...
Types revamp
2019-06-12 10:48:10 +02:00
Dan
83af58258c
Fix download_media ignoring the file_name argument
2019-06-11 20:36:09 +02:00
Dan
b9b50bad94
Fix get_users and get_contacts not returning pretty-printable lists
2019-06-11 16:46:10 +02:00
Dan
7baa00353d
Add a FAQ about DC migration
2019-06-11 15:59:39 +02:00
Dan
1ee8487712
Merge branch 'develop' into types-revamp
...
# Conflicts:
# pyrogram/client/methods/users/get_profile_photos.py
2019-06-11 14:45:21 +02:00
Dan
af08606087
Fix get_profile_photos not working when passing "me"/"self" as argument
2019-06-09 13:01:24 +02:00
Dan
5f3b7b97aa
Add archive_chats and unarchive_chats methods
2019-06-08 19:15:19 +02:00
Dan
a769fdfd20
Remove GameHighScores type
2019-06-08 15:16:51 +02:00
Dan
cfbc5298df
Remove Messages type
2019-06-08 15:13:52 +02:00
Dan
797de058e8
Remove ProfilePhotos type
2019-06-08 14:09:16 +02:00
Dan
c8fd446cb6
Remove Dialogs type
2019-06-08 14:00:00 +02:00
Dan
2db2ca3283
Remove ChatMembers type
2019-06-08 13:50:17 +02:00
Dan
2e05c81a5c
Update docs about Telegram data centers
2019-06-08 11:33:52 +02:00
Dan
fd3c8cf94f
Merge develop -> asyncio
2019-06-07 19:26:27 +02:00
Dan
c65e210c03
Fix FileData namedtuple using Python 3.7+ features
2019-06-07 18:48:34 +02:00
Dan
89e6f4137b
Fix get_chat_member always returning self for basic groups
2019-06-07 18:00:00 +02:00
Dan
f9ceed0c9c
Merge branch 'develop' into asyncio
...
# Conflicts:
# pyrogram/__init__.py
2019-06-07 16:36:49 +02:00
Dan
a80c5c1dbb
Fix broken links on decorators' docs
2019-06-07 15:49:16 +02:00
Dan
fe55233f50
Merge develop -> asyncio
2019-06-06 19:33:45 +02:00
Dan
da515af959
Rearrange code
2019-06-06 19:29:44 +02:00
Dan
b205c6cce0
Rename Photos to ProfilePhotos
2019-06-06 19:09:52 +02:00
Dan
17ddb0d1b7
Update get_chat_member docstrings
2019-06-05 13:58:32 +02:00
Dan
7c3bbb3fc7
Merge develop -> asyncio
2019-06-05 11:25:31 +02:00
Dan
a35e2620f8
Fix export_chat_invite_link for basic groups in Layer 100
2019-06-04 23:36:10 +02:00
Dan
a425e00a96
Add read_history method
2019-06-04 19:16:30 +02:00
Dan
896c9fa4fd
Add "unsave" parameter to send_animation
2019-06-04 16:32:42 +02:00
Dan
d4dbff3226
Merge develop -> asyncio
2019-06-02 19:14:16 +02:00
Dan
acc0fab311
Fix animated stickers media type. They are documents for now
2019-06-01 14:07:45 +02:00
Dan
1f2be4f1ce
Add send_animated_sticker method
2019-06-01 14:05:25 +02:00
Dan
a984558860
Rename methods dealing with profile pictures
2019-05-31 00:20:09 +02:00
Dan
cb3addab1e
Add iter_profile_photos method
2019-05-31 00:18:43 +02:00
Dan
0340271b33
Refactor docstrings
2019-05-30 15:23:43 +02:00
Dan
715ae14751
Update send_* methods (for file_ids)
2019-05-30 14:57:52 +02:00
Dan
55599e33c6
Rework download_media to accommodate L100 changes
2019-05-29 10:40:37 +02:00
Dan
38de4299c5
Add get_user_dc method
2019-05-29 09:43:48 +02:00
Dan
09d012b696
Rename get_user_profile_photos to get_user_photos
2019-05-29 09:43:33 +02:00
Dan
86a4f63d37
Rename set_user_profile_photo to set_photo
...
Users can only set a photo for themselves.
2019-05-29 09:42:55 +02:00
Dan
83cd828386
Rename get_user_profile_photos_count to get_user_photos_count
2019-05-29 09:41:59 +02:00
Dan
1390797f58
Rename delete_user_profile_photos to just delete_photos.
...
It's implied an user can only delete own photos.
2019-05-29 09:41:04 +02:00
Dan
c2424029b5
Fix dialogs after L100 update
2019-05-29 09:37:50 +02:00
Dan
e94dcd3b0b
Update docs
2019-05-28 16:41:55 +02:00
Dan
87ad981420
Add get_user_dc method
2019-05-27 14:39:10 +02:00
Dan
39439255fd
Merge develop -> asyncio
2019-05-25 02:02:37 +02:00
Dan
b6ea451ee5
Reword some method return type docstrings
2019-05-17 13:44:44 +02:00
Dan
53d0cc30f6
Remove get_chat_preview and have get_chat deal with ChatPreview objects
2019-05-17 13:18:24 +02:00
Dan
944b672fe5
Docs revamp. Part 4
2019-05-16 21:28:34 +02:00
Dan
94de75f714
Bring back the possibility to use strings as callback query data
...
In case bytes (which is the type used by telegram) can't be successfully
decoded into strings, the raw bytes are presented instead of trying to
decode by ignoring/replacing errors.
2019-05-13 21:04:17 +02:00
Dan
ef912d21ef
Use more concise and cleaner description of a method and a type
2019-05-12 19:49:06 +02:00
Dan
e4b0a78f1a
Docs revamp. Part 2
2019-05-10 16:14:10 +02:00
Dan
92283d6cab
Add timeout to Message.click
2019-05-09 05:55:44 +02:00
Dan
6530c7e293
Remove ChatAction module too
...
It's pretty much useless, better just use strings
2019-05-09 05:08:37 +02:00
Dan
1737ba5f49
Revamp docs about the main Pyrogram package
2019-05-09 04:28:46 +02:00
Dan
920f8ff911
Allow unlimited replies to be fetched with get_messages
2019-05-08 16:01:03 +02:00
Dan
47c4fae36d
Merge develop -> asyncio
2019-05-06 17:27:21 +02:00
Dan
692073c856
Fix get_dialogs_count breaking in case of less than 200 dialogs
2019-05-06 17:09:44 +02:00
Dan
08554633ce
Add get_user_profile_photos_count method
2019-05-06 17:07:41 +02:00
Dan
e8e0c16daf
Add get_contacts_count method
2019-05-06 17:00:09 +02:00
Dan
4e77ead181
Add get_dialogs_count method
2019-05-06 16:58:59 +02:00
Dan
e80eebc234
Add get_history_count method
2019-05-06 16:44:50 +02:00
Dan
bfda5852b6
Hint the return type of get_history
2019-05-05 15:44:28 +02:00
Dan
6c140fd03e
Merge pull request #238 from pyrogram/bot-api-4.2
...
Bot API 4.2
2019-05-05 12:25:42 +02:00
Dan
a6198921c3
Fix an unresolved reference
2019-05-03 22:55:00 +02:00
Dan
ec258312dd
Add missing awaits
2019-05-03 22:47:51 +02:00
Dan
952f9bc503
Merge branch 'develop' into asyncio
...
# Conflicts:
# pyrogram/__init__.py
# pyrogram/client/ext/base_client.py
# pyrogram/client/methods/messages/delete_messages.py
# pyrogram/client/types/messages_and_media/message.py
2019-04-30 11:51:36 +02:00
Dan
cc9bc56391
Add important note to export_chat_invite_link
2019-04-30 11:29:54 +02:00
Dan
d83a2a951d
Revert "Fix export_chat_invite_link broken because of Layer update Fixes #244 "
...
This reverts commit 2aad5985
2019-04-30 11:22:23 +02:00
Dan
2aad59856d
Fix export_chat_invite_link broken because of Layer update
...
Fixes #244
2019-04-30 11:04:37 +02:00
Dan
63d76a7f13
Bring back automatic mime type detection for new uploads ( fixes #239 )
...
- Add mime.types file to contain a good database of type -> ext mappings
from svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types
- Load mime.type at BaseClient creation and add two convenience methods
for guessing mime types from filenames and extensions from mime types,
guess_mime_type and guess_extension
- Make all send_* method as well as download_media use the new mime type
database via guess_mime_type and guess_extension methods
2019-04-20 18:56:30 +02:00
Dan
57be97566d
Make delete_messages return False when it fails to delete
...
This is because there will be no exception raised, because Telegram
is not sending any RPCError when you try to delete a message you don't
have rights on to.
2019-04-14 22:34:05 +02:00
Dan
5905f761fa
Add PollHandler type and on_poll decorator for handling Poll updates
2019-04-14 20:50:13 +02:00
bakatrouble
952f0627f1
Merge branch 'develop' into session_storage
...
# Conflicts:
# pyrogram/client/client.py
# pyrogram/client/ext/base_client.py
# pyrogram/client/ext/syncer.py
# pyrogram/client/style/html.py
# pyrogram/client/style/markdown.py
2019-04-14 21:49:45 +03:00
Dan
ebacefb6e0
Increase media thumbnail size limit
2019-04-14 20:33:45 +02:00
Dan
4661fb035b
Refactor Poll types and methods to reflect Bot API 4.2 docs
2019-04-14 20:17:42 +02:00
Dan
1dd3ba4133
Add missing awaits
2019-04-14 18:47:45 +02:00
Dan
1750300ab9
Add missing awaits
2019-04-13 17:58:20 +02:00
Dan
9100a43f7b
Merge branch 'develop' into asyncio
...
# Conflicts:
# pyrogram/client/methods/chats/set_chat_description.py
2019-04-13 16:26:50 +02:00
Dan
1e635f00ea
Fix set_chat_description not working anymore with the new Layer
2019-04-13 16:10:15 +02:00
Dan
d49aed3d9e
Merge branch 'develop' into asyncio
...
# Conflicts:
# pyrogram/__init__.py
2019-04-13 13:05:59 +02:00
Dan
05aed5e0e1
Clean up documentation pages
2019-04-12 15:52:06 +02:00
Dan
b94f6d4e99
Merge branch 'develop' into asyncio
...
# Conflicts:
# pyrogram/client/methods/chats/get_chat_members.py
2019-03-28 16:26:28 +01:00
Dan
fbe6af2fc6
Automatically handle flood waits when using get_chat_members
2019-03-28 16:24:11 +01:00
Dan
f96a0b7674
Merge branch 'develop' into asyncio
2019-03-28 14:02:02 +01:00
Dan
e79f4fde80
Fix send_chat_action not working with upload_* actions
2019-03-28 14:01:38 +01:00
Dan
7f7f9768fd
Add missing awaits
2019-03-27 15:16:15 +01:00
Dan
1179a5b994
Merge branch 'develop' into asyncio
...
# Conflicts:
# pyrogram/__init__.py
# pyrogram/client/client.py
# pyrogram/session/session.py
2019-03-25 11:52:54 +01:00
Dan
b8341a9869
Remove delete_messages limitations
2019-03-25 11:34:47 +01:00
Dan
b5c6db6db0
Refactor project and move errors namespace out from pyrogram.api
2019-03-25 11:23:45 +01:00
Dan
ac318831dc
Add missing awaits
2019-03-22 13:47:31 +01:00