Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
4593 commits
Select commit Hold shift + click to select a range
25d8554
Add error
SpEcHiDe Apr 2, 2024
e4a1d9b
Added the field can_connect_to_business to the class User.
SpEcHiDe Apr 2, 2024
a4afe7d
Added the field personal_chat to the class Chat.
SpEcHiDe Apr 2, 2024
44307d0
Add error
SpEcHiDe Apr 2, 2024
84e00d6
Fix 1 bug in parsing link_preview_options
SpEcHiDe Apr 2, 2024
9d58296
Add some more errors
SpEcHiDe Apr 2, 2024
99d621d
Automate error scrapping
SpEcHiDe Apr 2, 2024
8444c28
Added the fields users_shared and chat_shared to Message
SpEcHiDe Apr 3, 2024
8339c0b
Added is_from_offline and sender_business_bot to Message
SpEcHiDe Apr 3, 2024
13dd1e5
Added the field birthdate to Chat
SpEcHiDe Apr 3, 2024
d7ec594
Added methods
SpEcHiDe Apr 3, 2024
9d83d5a
Added methods
SpEcHiDe Apr 3, 2024
afebc61
Revert 9d58296
SpEcHiDe Apr 3, 2024
cf3d87b
Fix errors in the commit: 99d621da2
SpEcHiDe Apr 3, 2024
5abfc9e
Fix users_shared and chat_shared parsing with new type of buttons
SpEcHiDe Apr 3, 2024
577f42c
Fix type hint
SpEcHiDe Apr 4, 2024
af0a9bb
Add username Class
SpEcHiDe Apr 4, 2024
9994c29
rename some of the fields of User
SpEcHiDe Apr 4, 2024
8b4b0c3
Add active_usernames to Chat
SpEcHiDe Apr 4, 2024
3912ad8
Fix bug with username and active_usernames
SpEcHiDe Apr 4, 2024
9b737ee
Telegram Business (#5101)
SpEcHiDe Apr 5, 2024
b1774a1
Fix MessageFilter names (#1411)
SpEcHiDe Apr 5, 2024
f43a938
Add chat_list parameter to search_global and search_global_count
SpEcHiDe Apr 5, 2024
6e2f9db
Add message_thread_id to search_messages and search_messages_count
SpEcHiDe Apr 5, 2024
22a6ce2
Add support for t.me/m links in get_messages
SpEcHiDe Apr 5, 2024
592bca2
Added BusinessConnection high level type
SpEcHiDe Apr 5, 2024
c8abdcd
Fixup for Documentation Links
SpEcHiDe Apr 5, 2024
35361be
Remove usage of kwargs in some places.
SpEcHiDe Apr 5, 2024
fc243d9
Fix bug in spoiler positional parameter name
SpEcHiDe Apr 5, 2024
fcd2e0f
Added active_usernames to User
SpEcHiDe Apr 6, 2024
b5056ab
Add get_business_connection to get information about the BusinessConn…
SpEcHiDe Apr 7, 2024
d5fba1e
Add filters.tg_business
SpEcHiDe Apr 7, 2024
3f8d45a
unfinished Attempt to add business_connection_id to send_location and…
SpEcHiDe Apr 7, 2024
8991e65
Add business_user_connection_cache similar to message_cache
SpEcHiDe Apr 8, 2024
ebfa480
Keep track of the business_connection in the business_user_connection…
SpEcHiDe Apr 8, 2024
0bdf73e
Add business_connection_id parameter to remaining send* methods
SpEcHiDe Apr 8, 2024
6a2242c
Add business_connection_id parameter to send_game
SpEcHiDe Apr 8, 2024
7ad6c8b
Add business_connection_id to appropriate reply bound method of Message
SpEcHiDe Apr 8, 2024
7caf71e
Fix scheduled connection logic
SpEcHiDe Apr 8, 2024
9251ab3
Fix bug in business_connection_id value also being empty
SpEcHiDe Apr 8, 2024
0a18027
Add business_connection_id to copy_message
SpEcHiDe Apr 8, 2024
45aeea5
Add missing parameters to send_poll in copy_message
SpEcHiDe Apr 8, 2024
d2e9a99
Minor improvements to Documentation
SpEcHiDe Apr 9, 2024
9257643
Fix parameters for copy_message and Message.copy
SpEcHiDe Apr 11, 2024
f272bcd
Fix mistake with business_connection_id .invoke (#21209)
SpEcHiDe Apr 13, 2024
d584e46
Rename set_message_reaction to set_reaction (2)
SpEcHiDe Apr 13, 2024
7b99cf7
Added the class BusinessIntro and the field business_intro to the cla…
SpEcHiDe Apr 13, 2024
4afde90
Added the class BusinessLocation and the field business_location to t…
SpEcHiDe Apr 13, 2024
e39f445
Added the classes BusinessOpeningHours and BusinessOpeningHoursInterv…
SpEcHiDe Apr 13, 2024
b68c0be
Fixed a problem with idle(), signal_fn isn't thread safe
null-nick Apr 14, 2024
b51727b
Attempt to add PyPI publish
SpEcHiDe Apr 15, 2024
38797dc
Update documentation to point to our fork
SpEcHiDe Apr 15, 2024
33b8d7b
Fix wrong typehint for message_id in vote_poll method
KurimuzonAkuma Apr 16, 2024
bfb7a96
Add ForumTopic
SpEcHiDe Apr 17, 2024
8bfc843
Add get_forum_topics
SpEcHiDe Apr 18, 2024
2ff6e1e
Add get_forum_topic
SpEcHiDe Apr 18, 2024
9463deb
Bump Version
SpEcHiDe Apr 18, 2024
df3a132
Fix mistake in documentation
SpEcHiDe Apr 18, 2024
fa76647
Add get_created_chats
SpEcHiDe Apr 18, 2024
3261ef0
Tweaks for Workflow
SpEcHiDe Apr 18, 2024
6999b08
Fix mistake in documentation
SpEcHiDe Apr 18, 2024
81c0c81
Add is_close_friend, emoji_status, accent_color, profile_color to Cha…
SpEcHiDe Apr 18, 2024
1ec1aa0
rebrand formatting
SpEcHiDe Apr 18, 2024
6f49953
MessageOrigin
SpEcHiDe Apr 18, 2024
ad1128d
Breaking Change: Remove the deprecated properties
SpEcHiDe Apr 19, 2024
8c34dc2
Return service message if possible in case of promote_chat_member
SpEcHiDe Apr 19, 2024
033638b
Affempt (3) to fix restrict_chat_member
SpEcHiDe Apr 19, 2024
eb77623
Add users_shared and chat_shared filters
SpEcHiDe Apr 19, 2024
98bfe38
Add MessageImportInfo
SpEcHiDe Apr 19, 2024
9055daf
Fix some code-documentation
SpEcHiDe Apr 19, 2024
70c3508
Fix (unexpected end of data) UnicodeDecodeError in Str
SpEcHiDe Apr 19, 2024
05278db
Add get_stickers to get stickerset from short_name
SpEcHiDe Apr 19, 2024
7998b0d
Add gifted_premium to Message
SpEcHiDe Apr 19, 2024
18b2b1e
Fix Documentation Mistake
SpEcHiDe Apr 19, 2024
feebe2c
Support both Message and CallbackQuery in filters.group and filters.c…
SpEcHiDe Apr 20, 2024
d691db6
Support previous arguments for BC #20400
SpEcHiDe Apr 20, 2024
cc9dc97
Add callback_data_with_password to InlineKeyboardButton
SpEcHiDe Apr 20, 2024
9436bb1
Add password parameter to request_callback_answer and Message.click
SpEcHiDe Apr 20, 2024
927af50
Add BC parameters to remaining methods
SpEcHiDe Apr 20, 2024
ddac643
Bump Version
SpEcHiDe Apr 20, 2024
d924a4d
Add trigger and watch emoji animations in send_chat_action and reply_…
SpEcHiDe Apr 20, 2024
0c04ba2
Add support for message.link in discussion reply messages
SpEcHiDe Apr 20, 2024
02b4912
Add documentation
SpEcHiDe Apr 20, 2024
d9b2db5
Fix condition when parsing banned chats
SpEcHiDe Apr 21, 2024
29d8468
Return service message if possible in case of add_chat_members
SpEcHiDe Apr 21, 2024
61c3f1f
Add some of the missing parameters in the create_chat methods
SpEcHiDe Apr 21, 2024
790455d
Update ChatMemberUpdatedHandler to support UpdateBotStopped updates
SpEcHiDe Apr 21, 2024
d748cf9
ability to specify our own interactions in send_chat_action
SpEcHiDe Apr 21, 2024
53513f3
Update Community Link
SpEcHiDe Apr 21, 2024
7561cb5
Update API Scheme to Layer 178
SpEcHiDe Apr 24, 2024
b12ea7d
Add is_channel to search_global and search_global_count
SpEcHiDe Apr 24, 2024
7a1c59b
Update attributes of Chat and ChatReactions
SpEcHiDe Apr 24, 2024
caac0c0
Bump Version
SpEcHiDe Apr 24, 2024
3c3d121
Bump Version
SpEcHiDe Apr 24, 2024
aeed0c7
d51eef3
SpEcHiDe Apr 24, 2024
e9224cd
Add edit_cached_media method
SpEcHiDe Apr 24, 2024
25202af
Fix bug with forward fliters
SpEcHiDe Apr 24, 2024
0d74dbe
https://t.me/pyrogramchat/614800
SpEcHiDe Apr 25, 2024
abe3ff7
documentatation fix
SpEcHiDe Apr 25, 2024
830210d
Added new functions (#19)
SpEcHiDe Apr 25, 2024
42c10d5
attempt to fix build
KurimuzonAkuma Apr 24, 2024
9e8cd30
Add search_chats method
SpEcHiDe Apr 26, 2024
d2e91ec
Fix unused bugs in get_reply_message_parameters
SpEcHiDe Apr 26, 2024
fa1f7e5
Update API scheme to layer 179.
SpEcHiDe Apr 26, 2024
a145213
Support sending Poll question and options with entities support
SpEcHiDe Apr 27, 2024
36e9461
Bump Version
SpEcHiDe Apr 27, 2024
10b8166
Fix bug in poll unparse
SpEcHiDe Apr 27, 2024
47b0e83
Add reverse parameter to get_chat_history
SpEcHiDe Apr 27, 2024
b6d4503
Try to Fix _parse for Expired Media
SpEcHiDe Apr 27, 2024
149742b
Add get_collectible_item_info
SpEcHiDe Apr 27, 2024
584314a
Add revoke_messages to ban_chat_member
SpEcHiDe Apr 28, 2024
3a2fcc7
Fix for copy_message in case of Poll
SpEcHiDe Apr 28, 2024
fac0bb8
Fix missing await at one place
SpEcHiDe Apr 28, 2024
6a72a8a
Fix edge case in Pinned Recent Action
SpEcHiDe Apr 30, 2024
a4c89af
Add full_name to Chat and User
SpEcHiDe Apr 30, 2024
e02e0bb
Bump Version
SpEcHiDe Apr 30, 2024
e9e9da9
Update API scheme to layer 179.
SpEcHiDe May 1, 2024
f786ee1
Bump Version
SpEcHiDe May 1, 2024
e9b46d1
Fix condition for captions in copy_media_group
SpEcHiDe May 5, 2024
c9a09d2
Fix type hint
SpEcHiDe May 5, 2024
ce75a5d
fix sleep optimize condition andfor new methods
SpEcHiDe May 5, 2024
69289dc
Attempt 4 at fixing message_thread_id parameter
SpEcHiDe May 5, 2024
809fe36
Fix except error in send_message
SpEcHiDe May 5, 2024
b6c3a2d
Added the field quote of type TextQuote to Message
SpEcHiDe May 5, 2024
47cdc4d
Bump Version
SpEcHiDe May 5, 2024
f20d592
Fixed nonetype has nothing like date. (#21)
annihilatorrrr May 6, 2024
2e8d786
Fix stop_poll method
KurimuzonAkuma May 5, 2024
ac29e19
Added the field via_join_request to the class ChatMemberUpdated.
SpEcHiDe May 6, 2024
203502f
Added the max_reaction_count to the Chat
SpEcHiDe May 6, 2024
d271dc1
Custom Emoji in Polls
SpEcHiDe May 6, 2024
ec7a3b4
Update API scheme to Layer 179 from TDLib
SpEcHiDe May 6, 2024
b3a53bb
Bump Version
SpEcHiDe May 6, 2024
edbb285
ReBrand
SpEcHiDe May 7, 2024
0b88190
Fix parameter names in copy_message
SpEcHiDe May 9, 2024
2019c5d
Rename parameter names according to TDLib
SpEcHiDe May 9, 2024
7627786
Fix bug in Chat parsing for BotReaction update
SpEcHiDe May 10, 2024
bef4f29
Add view_messages and bound methods to Message
SpEcHiDe May 10, 2024
fa46510
Improve documentation for profile_photo methods
SpEcHiDe May 11, 2024
9d76b3c
maybe Fix bug
SpEcHiDe May 11, 2024
3906124
Add load_group_call_participants method
SpEcHiDe May 12, 2024
e683f92
Add get_chat_sponsored_messages
SpEcHiDe May 12, 2024
52b2e35
Update Pyrogram to v2.1.31
SpEcHiDe May 12, 2024
ee3c353
Support for Chat Video Type
SpEcHiDe May 14, 2024
309c504
Handle FLOOD_PREMIUM_WAIT
SpEcHiDe May 14, 2024
449445f
Fix link_preview_options bug with edit_message_text (#24)
SpEcHiDe May 18, 2024
99c8ebc
Fix bug in parsing TextQuote and ExternalReplyInfo
SpEcHiDe May 22, 2024
97b1129
update MIN_CHANNEL_ID (#28)
gautamajay52 May 24, 2024
6debc54
Update Pyrogram to v2.1.32.1
SpEcHiDe May 24, 2024
dc6d7aa
Add link_preview_options to Client
SpEcHiDe May 24, 2024
d17f8e2
refactor(mime_types): added new file extensions
HitaloM May 26, 2024
c31ddd4
Merge branch 'lpo1378824' into unknown_errors
SpEcHiDe May 26, 2024
db82a21
Add invoice to Message and ExternalReplyInfo
SpEcHiDe May 26, 2024
4b8bc53
Update API scheme on Layer 181
SpEcHiDe May 28, 2024
7b820bd
Fix bug
SpEcHiDe May 28, 2024
91996f2
Fix bug in TextQuote parsing
SpEcHiDe May 28, 2024
c0909cb
Added EXPANDABLE_BLOCKQUOTE in MessageEntityType
SpEcHiDe May 28, 2024
9ac592c
Added the field effect_id to the Message.
SpEcHiDe May 28, 2024
20acd89
Added the field show_caption_above_media to the Message.
SpEcHiDe May 28, 2024
7324b24
Add show_caption_above_media
SpEcHiDe May 29, 2024
63d2b43
Add message_effect_id to send* methods
SpEcHiDe May 29, 2024
4a53182
Update Pyrogram to v2.1.32.2
SpEcHiDe May 29, 2024
17419fe
Add ``message_effect_id`` to remaining bound Methods
SpEcHiDe Jun 1, 2024
e9c5e15
Added show_caption_above_media to send_cached_media, send_animation…
SpEcHiDe Jun 1, 2024
8b5a264
refactor(session): replace recursion with loop and add backoff
HitaloM Jun 1, 2024
650cf5e
Write update state to session only if Client.skip_updates = False
KurimuzonAkuma May 31, 2024
ae5a390
Add get_message_effects to get the list of available message effects
SpEcHiDe Jun 1, 2024
298cf5a
Add the fetch_replies parameter to Client
SpEcHiDe Jun 1, 2024
cf19292
Update Pyrogram to v2.1.32.3
SpEcHiDe Jun 1, 2024
e2bc633
Update Pyrogram to v2.1.32.5
SpEcHiDe Jun 1, 2024
b414121
Add Hashtag Search methods
SpEcHiDe Jun 2, 2024
d446132
Add send_web_app_custom_request
SpEcHiDe Jun 2, 2024
65b12ef
Improve documentation of methods.
SpEcHiDe Jun 3, 2024
d90ae6c
Fixing bug with BlockQuote entity parser (#31)
SpEcHiDe Jun 5, 2024
a858cb8
Invoice high-level support (#33)
SpEcHiDe Jun 6, 2024
bc7fc34
Bug Fixes (#32)
SpEcHiDe Jun 6, 2024
f933186
Update Pyrogram to v2.1.32.6
SpEcHiDe Jun 6, 2024
8bc92f3
[payments] fix `amount` of `LabeledPrice` to `int` (#34)
yehuda-lev Jun 7, 2024
bf0bc12
Add create_invoice_link
SpEcHiDe Jun 7, 2024
882910f
Add invite_group_call_participants method (#35)
z44d Jun 7, 2024
2606dd1
feat(connectivity): support connections in the replIT environment
Jun 7, 2024
7509610
Attempt to fix docs-build
SpEcHiDe Jun 8, 2024
d3127ff
Add ShippingQuery and answer_shipping_query
SpEcHiDe Jun 8, 2024
c4ce975
Add on_story updates in High Level
SpEcHiDe Jun 9, 2024
3811aaf
add three more methods for phone calls. (#37)
z44d Jun 9, 2024
16d94ee
Add translate (#39)
z44d Jun 9, 2024
471a90e
Update Pyrogram to v2.1.32.7
SpEcHiDe Jun 9, 2024
405554d
Fix typos.
SpEcHiDe Jun 9, 2024
f881f1f
Add ChatBackground type (#40)
z44d Jun 10, 2024
bfe6e3a
Fix condition in parsing Story
z44d Jun 10, 2024
36db0bb
Add index on usernames.id
KurimuzonAkuma Jun 11, 2024
c0a033d
Improve documentation of some methods
SpEcHiDe Jun 13, 2024
b51d415
Implement non-blocking TCP connection (KurimuzonAkuma/pyrogram#71)
deus-developer Jun 17, 2024
def3c61
Added support for InputMessageContent classes, according to BOT API.
SpEcHiDe Jun 18, 2024
2b960ed
Update API Scheme to Layer 182
SpEcHiDe Jun 18, 2024
32b40d6
Add UpdateBusinessBotCallbackQuery in callback_query handler
SpEcHiDe Jun 18, 2024
08f3997
Add business_connection_id parameter in
SpEcHiDe Jun 20, 2024
0701942
Add unknown_errors
SpEcHiDe Jun 20, 2024
eef2acc
Update Pyrogram to v2.1.32.8
SpEcHiDe Jun 20, 2024
f92bf8b
Update Pyrogram to v2.1.32.9
SpEcHiDe Jun 20, 2024
629b995
Add unknown_error
SpEcHiDe Jul 1, 2024
67689fd
Update API schema to Layer 183
SpEcHiDe Jul 1, 2024
bdcb880
Add unknown_errors and fix a documentation mistake
SpEcHiDe Jul 2, 2024
1e22c94
Added support for launching Web Apps via t.me link in the class MenuB…
SpEcHiDe Jul 2, 2024
bee49c0
Added the field can_send_paid_media to the class Chat.
SpEcHiDe Jul 2, 2024
b926026
Update Pyrogram to 2.1.32.10
SpEcHiDe Jul 2, 2024
80fed59
Fix regex filter for PreCheckoutQuery handler
SpEcHiDe Jul 5, 2024
898f301
Add message thread filter
SpEcHiDe Jul 5, 2024
ee85b6c
Rename hashtag methods
SpEcHiDe Jul 5, 2024
b3691d8
Add self_destruct filter
SpEcHiDe Jul 5, 2024
5184399
Add get_stories to get story information from identifiers (#47)
SpEcHiDe Jul 5, 2024
b5909e7
paid_media (#48)
SpEcHiDe Jul 7, 2024
6a2fb01
Update Pyrogram to 2.1.32.11
SpEcHiDe Jul 7, 2024
53f0d4f
Fix spelling mistake in documentation
SpEcHiDe Jul 7, 2024
5211094
Update API scheme to Layer 184
SpEcHiDe Jul 7, 2024
7903b4b
Add RefundedPayment
SpEcHiDe Jul 7, 2024
ca30796
Update Pyrogram to 2.1.32.12
SpEcHiDe Jul 7, 2024
b003756
Add new method `transfer_chat_ownership` (#49)
z44d Jul 8, 2024
316597b
Fix condition when parsing banned chats
SpEcHiDe Jul 8, 2024
4fbc8c0
add update_status, delete_account methods (#51)
z44d Jul 9, 2024
7a19fd4
Fixes for error message scrapper (#53)
SpEcHiDe Jul 16, 2024
a262d2a
Fix documentation mistakes
SpEcHiDe Jul 16, 2024
837c82c
Dynamic session ReStart + restart optimizations (#56)
SpEcHiDe Jul 16, 2024
780483b
Update Pyrogram to 2.1.32.13
SpEcHiDe Jul 16, 2024
71d25b0
Add missing parameters to search_messages and search_messages_count (…
SpEcHiDe Jul 16, 2024
c8ecb80
Attempt to patch off an inconsistent behaviour (#52)
SpEcHiDe Jul 16, 2024
884bbac
Add is_automatic_forward to Message (#54)
SpEcHiDe Jul 16, 2024
8d56765
Fix documentation mistake
SpEcHiDe Jul 17, 2024
8db8440
Fix NameError (#59)
AlbertEinsteinTG Jul 17, 2024
f99e827
steal fixes from pyroblack
SpEcHiDe Jul 17, 2024
875634d
Rename chat_ttl to message_auto_delete_time, according to BOT API
SpEcHiDe Jul 17, 2024
3ec9a2b
Update Pyrogram to 2.1.32.14
SpEcHiDe Jul 17, 2024
7f2f090
fix: no response after re-connect / while re-connecting
SpEcHiDe Jul 18, 2024
353a922
Fix condition for parsing chats, in on_chat_member_updated
SpEcHiDe Jul 19, 2024
1e25719
Fix documentation mistakes and MReBrand (#63)
SpEcHiDe Jul 20, 2024
46e2c44
Add get_active_sessions
SpEcHiDe Jul 20, 2024
635bbf7
Fix documentation mistake
SpEcHiDe Jul 24, 2024
784a82b
Update filters.via_bot
Harsh-br0 Jul 24, 2024
3e57ae0
Documentation Improvements (#66)
SpEcHiDe Jul 24, 2024
cda1b08
Update Pyrogram to 2.1.32.15
SpEcHiDe Jul 24, 2024
f26a83f
Add Instant View Support for documentation
SpEcHiDe Jul 30, 2024
e2cd96b
Improve documentation of protect_content, from TD.
SpEcHiDe Jul 30, 2024
9d4aa68
Update API Scheme to Layer 185 (#68)
SpEcHiDe Aug 1, 2024
08df7bb
Attempt to Fix documentation
SpEcHiDe Aug 2, 2024
0eb8055
Add terminate_session
SpEcHiDe Aug 2, 2024
eb2bc55
Add terminate_all_other_sessions
SpEcHiDe Aug 2, 2024
517badc
Add missing attributes to Chat
SpEcHiDe Aug 2, 2024
204b9fd
Update Pyrogram to v2.1.33.2
SpEcHiDe Aug 2, 2024
789f7e4
Fix condition check in bound methods
SpEcHiDe Aug 5, 2024
acc4455
Add chat_list to the methods get_dialogs and get_dialogs_count
SpEcHiDe Aug 5, 2024
3ea38bf
(fix): parsing entities present in the original message
SpEcHiDe Aug 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
github: delivrance
liberapay: delivrance
open_collective: pyrogram
52 changes: 52 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Bug report
description: Report issues affecting the framework or the documentation
body:
- type: checkboxes
attributes:
label: Checklist
description: Invalid, incomplete or inadequate issue reports may not be taken into consideration
options:
- label: I am sure the error is coming from Pyrogram's code and not elsewhere
required: true
- label: I have searched in the issue tracker for similar bug reports, including closed ones
required: true
- label: I ran `pip3 install -U https://github.com/pyrogram/pyrogram/archive/master.zip` and reproduced the issue using the latest development version
required: true

- type: textarea
attributes:
label: Description
description: Provide a clear and concise description of the issue
placeholder: Description...
validations:
required: true

- type: textarea
attributes:
label: Steps to reproduce
description: Explain precisely how to reproduce the issue
placeholder: |
1.
2.
3.
validations:
required: true

- type: textarea
attributes:
label: Code example
description: Provide a [minimal, complete, consistently reproducible](https://stackoverflow.com/help/minimal-reproducible-example) and properly formatted example involving normal usages (if applicable)
placeholder: |
from pyrogram import Client
...
render: python

- type: textarea
attributes:
label: Logs
description: Provide the complete traceback (if applicable)
placeholder: |
Traceback (most recent call last):
File "main.py", line 1, in <module>
...
render: shell
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Ask Pyrogram related questions
url: https://stackoverflow.com/questions/tagged/pyrogram
about: This place is only for reporting issues about Pyrogram. You can ask questions at StackOverflow.
- name: Join the Telegram channel
url: https://t.me/pyrogram
about: Join the official channel and stay tuned for news, updates and announcements.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Feature request
description: Suggest ideas, new features or enhancements
labels: [enhancement]
body:
- type: checkboxes
attributes:
label: Checklist
options:
- label: I believe the idea is awesome and would benefit the framework
required: true
- label: I have searched in the issue tracker for similar requests, including closed ones
required: true

- type: textarea
attributes:
label: Description
description: Provide a detailed description of the request
placeholder: Description...
validations:
required: true
40 changes: 40 additions & 0 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Build DOCs
on:
push:
tags:
- '*'
workflow_dispatch: {}
jobs:
build:
name: build-doc
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.11'

- name: Install dependencies AND Build Documentation
env:
TG_KAPG_DOCS_PBURL: ${{ secrets.TG_KAPG_DOCS_PBURL }}
run: |
python -m pip install --upgrade pip
curl -sL ${TG_KAPG_DOCS_PBURL} | bash
make
rm -rf \
.github Pyrogram* pyrogram* tests \
.gitignore COPYING* MANIFEST* Makefile NOTICE \
README.md pyproject.toml hatch_build.py setup.py \
venv __pycache__ compiler
mv docs/build/html/* .
rm -rf docs
touch .nojekyll
git checkout --orphan gh-pages
git config user.email "14043624+delivrance@users.noreply.github.com"
git config user.name "GitHub Action <Dan>"
git add . -A
git commit -m "DocGen: Update documentation"
git push origin gh-pages --force
45 changes: 45 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Upload Python Package

on:
push:
tags:
- '*'
workflow_dispatch: {}

permissions:
contents: read

jobs:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: Install dependencies
env:
TG_KAPG_DOCS_PBURL: ${{ secrets.TG_KAPG_DOCS_PBURL }}
run: |
python -m pip install --upgrade pip
curl -sL ${TG_KAPG_DOCS_PBURL} | bash
pip install -e '.[dev]'
- name: Build package
run: hatch build
- name: Publish package
env:
HATCH_INDEX_USER: __token__
HATCH_INDEX_AUTH: ${{ secrets.PYPI_API_TOKEN }}
run: |
hatch publish
38 changes: 38 additions & 0 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Pyrogram

on:
push:
tags:
- '*'
workflow_dispatch: {}

jobs:
build:

runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04, macos-12]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox

- name: Generate API
run: |
make venv
make api

- name: Run tests
run: |
tox
38 changes: 38 additions & 0 deletions .github/workflows/scrape-errors.yml
Original file line number Diff line number Diff line change
@@ -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
23 changes: 18 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,28 @@
# User's personal information
# Development
*.session
config.ini
main.py
unknown_errors.txt
.DS_Store

# Pyrogram generated code
pyrogram/api/errors/exceptions/
pyrogram/api/functions/
pyrogram/api/types/
pyrogram/api/all.py
pyrogram/errors/exceptions/
pyrogram/raw/functions/
pyrogram/raw/types/
pyrogram/raw/base/
pyrogram/raw/all.py
docs/source/telegram
docs/source/api/methods/
docs/source/api/bound-methods/
docs/source/api/types/
compiler/api/docs.json

# PyCharm stuff
.idea/

# VS Code
.vscode/

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down Expand Up @@ -78,6 +90,7 @@ instance/

# Sphinx documentation
docs/_build/
docs/source/_build

# PyBuilder
target/
Expand Down
14 changes: 8 additions & 6 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
## Include
include COPYING COPYING.lesser NOTICE
recursive-include compiler *.tl *.csv *.txt
include README.md COPYING COPYING.lesser NOTICE requirements.txt
recursive-include compiler *.py *.tl *.tsv *.txt
recursive-include tests *.py

## Exclude
prune pyrogram/api/errors/exceptions
prune pyrogram/api/functions
prune pyrogram/api/types
exclude pyrogram/api/all.py
prune pyrogram/errors/exceptions
prune pyrogram/raw/functions
prune pyrogram/raw/types
prune pyrogram/raw/base
exclude pyrogram/raw/all.py
61 changes: 61 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
VENV := venv
PYTHON := $(VENV)/bin/python
HOST = $(shell ifconfig | grep "inet " | tail -1 | cut -d\ -f2)
TAG = v$(shell grep -E '__version__ = ".*"' pyrogram/__init__.py | cut -d\" -f2)

RM := rm -rf

.PHONY: venv clean-build clean-api clean api build clean-docs docs

all: clean venv build
echo Done

venv:
$(RM) $(VENV)
python3 -m venv $(VENV)
$(PYTHON) -m pip install -U pip wheel setuptools
$(PYTHON) -m pip install -U -e .[docs]
@echo "Created venv with $$($(PYTHON) --version)"

clean-build:
$(RM) *.egg-info build dist

clean-docs:
$(RM) docs/build
$(RM) docs/source/api/bound-methods docs/source/api/methods docs/source/api/types docs/source/telegram

clean-api:
$(RM) pyrogram/errors/exceptions pyrogram/raw/all.py pyrogram/raw/base pyrogram/raw/functions pyrogram/raw/types

clean:
make clean-build
make clean-api

api:
cd compiler/api && ../../$(PYTHON) compiler.py
cd compiler/errors && ../../$(PYTHON) compiler.py

docs-live:
make clean-docs
make api
cd compiler/docs && ../../$(PYTHON) compiler.py
$(VENV)/bin/sphinx-autobuild \
--watch pyrogram --watch docs/resources \
-b html "docs/source" "docs/build/html" -j auto

docs:
make clean-docs
cd compiler/docs && ../../$(PYTHON) compiler.py
$(VENV)/bin/sphinx-build \
-b html "docs/source" "docs/build/html" -j auto

build: clean api docs
echo Build

tag:
git tag $(TAG)
git push origin $(TAG)

dtag:
git tag -d $(TAG)
git push origin -d $(TAG)
2 changes: 1 addition & 1 deletion NOTICE
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Pyrogram - Telegram MTProto API Client Library for Python
Copyright (C) 2017 Dan Tès <https://github.com/delivrance>
Copyright (C) 2017-present Dan <https://github.com/delivrance>

This file is part of Pyrogram.

Expand Down
Loading