Skip to content

Commit b073b04

Browse files
author
Pyrogram-Mod - Dev
committed
feat: stories, stars, business, boosts, todo and saved messages
1 parent e2e3f40 commit b073b04

171 files changed

Lines changed: 11723 additions & 31 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,3 +130,4 @@ venv.bak/
130130
docs_build.sh
131131
.buildinfo
132132
json_docs.py
133+
*.session-journal

compiler/docs/compiler.py

Lines changed: 177 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,24 @@ def get_title_list(s: str) -> list:
222222
export_session_string
223223
set_parse_mode
224224
""",
225+
decorators="""
226+
Decorators
227+
on_message
228+
on_edited_message
229+
on_callback_query
230+
on_inline_query
231+
on_chosen_inline_result
232+
on_poll
233+
on_user_status
234+
on_deleted_messages
235+
on_chat_member_updated
236+
on_raw_update
237+
on_disconnect
238+
on_chat_join_request
239+
on_story
240+
on_chat_boost
241+
on_business_connection
242+
""",
225243
messages="""
226244
Messages
227245
send_message
@@ -242,6 +260,7 @@ def get_title_list(s: str) -> list:
242260
send_contact
243261
send_cached_media
244262
send_reaction
263+
send_paid_reaction
245264
edit_message_text
246265
edit_message_caption
247266
edit_message_media
@@ -272,6 +291,13 @@ def get_title_list(s: str) -> list:
272291
get_discussion_replies
273292
get_discussion_replies_count
274293
get_custom_emoji_stickers
294+
toggle_todo_completed
295+
get_saved_dialogs
296+
get_pinned_saved_dialogs
297+
reorder_pinned_saved_dialogs
298+
pin_saved_dialog
299+
get_saved_reaction_tags
300+
update_saved_reaction_tag
275301
""",
276302
chats="""
277303
Chats
@@ -387,6 +413,7 @@ def get_title_list(s: str) -> list:
387413
set_chat_menu_button
388414
get_chat_menu_button
389415
answer_web_app_query
416+
send_streaming_text
390417
""",
391418
authorization="""
392419
Authorization
@@ -411,6 +438,50 @@ def get_title_list(s: str) -> list:
411438
invoke
412439
resolve_peer
413440
save_file
441+
""",
442+
stories="""
443+
Stories
444+
send_story
445+
get_stories
446+
edit_story
447+
delete_stories
448+
read_stories
449+
get_story_public_forwards
450+
get_story_views_list
451+
get_story_reactions_list
452+
send_story_reaction
453+
""",
454+
payments="""
455+
Payments
456+
get_stars_status
457+
get_stars_transactions
458+
get_star_gifts
459+
get_unique_star_gift
460+
get_saved_star_gifts
461+
get_star_gift_auction_state
462+
""",
463+
boosts="""
464+
Boosts
465+
get_boost_status
466+
get_boosts_list
467+
apply_boost
468+
get_boost_level_options
469+
get_my_boosts
470+
""",
471+
business="""
472+
Business
473+
get_business_chat_links
474+
create_business_chat_link
475+
edit_business_chat_link
476+
delete_business_chat_link
477+
get_bot_business_connection
478+
get_quick_replies
479+
get_quick_reply_messages
480+
send_quick_reply_messages
481+
edit_quick_reply_shortcut
482+
delete_quick_reply_shortcut
483+
check_quick_reply_shortcut
484+
delete_quick_reply_messages
414485
"""
415486
)
416487

@@ -469,6 +540,9 @@ def get_title_list(s: str) -> list:
469540
Dialog
470541
Restriction
471542
EmojiStatus
543+
Birthday
544+
BotVerification
545+
BotVerifierSettings
472546
""",
473547
messages_media="""
474548
Messages & Media
@@ -500,6 +574,15 @@ def get_title_list(s: str) -> list:
500574
WebAppData
501575
MessageReactions
502576
ChatReactions
577+
PaidMedia
578+
TodoList
579+
TodoItem
580+
TodoCompletion
581+
FactCheck
582+
SuggestedPost
583+
MessageEffect
584+
PublicForward
585+
PublicForwards
503586
""",
504587
bot_keyboards="""
505588
Bot keyboards
@@ -574,6 +657,74 @@ def get_title_list(s: str) -> list:
574657
Authorization
575658
SentCode
576659
TermsOfService
660+
""",
661+
stories="""
662+
Stories
663+
StoryItem
664+
StoryViews
665+
StoryView
666+
StoryViewsList
667+
PeerStories
668+
StoriesStealthMode
669+
MediaArea
670+
MediaAreaCoordinates
671+
StoryForwardHeader
672+
StoryReaction
673+
StoryReactionsList
674+
""",
675+
payments="""
676+
Payments
677+
StarsAmount
678+
StarsTransaction
679+
StarsTransactionPeer
680+
StarsSubscription
681+
StarsSubscriptionPricing
682+
StarsStatus
683+
StarsRevenueStatus
684+
StarsTopupOption
685+
StarsGiftOption
686+
PaidReactionPrivacy
687+
""",
688+
star_gifts="""
689+
Star Gifts
690+
StarGift
691+
StarGiftUnique
692+
StarGiftAuctionState
693+
StarGiftAuctionUserState
694+
StarGiftAuctionRound
695+
AuctionBidLevel
696+
DisallowedGiftsSettings
697+
""",
698+
business="""
699+
Business
700+
BusinessInfo
701+
BusinessWorkHours
702+
BusinessWeeklyOpen
703+
BusinessLocation
704+
BusinessIntro
705+
BusinessGreetingMessage
706+
BusinessAwayMessage
707+
BusinessRecipients
708+
BusinessConnection
709+
QuickReply
710+
BusinessChatLink
711+
BusinessBotRecipients
712+
""",
713+
boosts="""
714+
Boosts
715+
Boost
716+
BoostStatus
717+
BoostsList
718+
GiveawayResults
719+
PrepaidGiveaway
720+
MyBoost
721+
MyBoosts
722+
""",
723+
saved_messages="""
724+
Saved Messages
725+
SavedDialog
726+
SavedDialogs
727+
SavedReactionTag
577728
"""
578729
)
579730

@@ -685,6 +836,31 @@ def get_title_list(s: str) -> list:
685836
ChatJoinRequest
686837
ChatJoinRequest.approve
687838
ChatJoinRequest.decline
839+
""",
840+
story_item="""
841+
StoryItem
842+
StoryItem.delete
843+
StoryItem.react
844+
StoryItem.get_views
845+
StoryItem.get_reactions
846+
StoryItem.get_public_forwards
847+
""",
848+
quick_reply="""
849+
QuickReply
850+
QuickReply.get_messages
851+
QuickReply.send_messages
852+
QuickReply.edit
853+
QuickReply.delete
854+
""",
855+
business_chat_link="""
856+
BusinessChatLink
857+
BusinessChatLink.edit
858+
BusinessChatLink.delete
859+
""",
860+
saved_dialog="""
861+
SavedDialog
862+
SavedDialog.pin
863+
SavedDialog.unpin
688864
"""
689865
)
690866

@@ -744,4 +920,4 @@ def start():
744920
DESTINATION = "../../docs/source/telegram"
745921
PYROGRAM_API_DEST = "../../docs/source/api"
746922

747-
start()
923+
start()

docs/source/api/decorators.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ Index
4343
- :meth:`~Client.on_poll`
4444
- :meth:`~Client.on_disconnect`
4545
- :meth:`~Client.on_raw_update`
46+
- :meth:`~Client.on_story`
47+
- :meth:`~Client.on_chat_boost`
48+
- :meth:`~Client.on_business_connection`
4649

4750
-----
4851

@@ -62,3 +65,6 @@ Details
6265
.. autodecorator:: pyrogram.Client.on_poll()
6366
.. autodecorator:: pyrogram.Client.on_disconnect()
6467
.. autodecorator:: pyrogram.Client.on_raw_update()
68+
.. autodecorator:: pyrogram.Client.on_story()
69+
.. autodecorator:: pyrogram.Client.on_chat_boost()
70+
.. autodecorator:: pyrogram.Client.on_business_connection()
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
BoostType
2+
=========
3+
4+
.. currentmodule:: pyrogram.enums
5+
6+
.. autoclass:: BoostType
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
BusinessAwayMessageSchedule
2+
===========================
3+
4+
.. currentmodule:: pyrogram.enums
5+
6+
.. autoclass:: BusinessAwayMessageSchedule
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
PrivacyKeyType
2+
==============
3+
4+
.. currentmodule:: pyrogram.enums
5+
6+
.. autoclass:: PrivacyKeyType
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
StoryPrivacyType
2+
================
3+
4+
.. currentmodule:: pyrogram.enums
5+
6+
.. autoclass:: StoryPrivacyType

docs/source/api/enums/index.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ to apply only a valid value among the expected ones.
2727
SentCodeType
2828
NextCodeType
2929
UserStatus
30+
BoostType
31+
BusinessAwayMessageSchedule
32+
PrivacyKeyType
33+
StoryPrivacyType
3034

3135
.. toctree::
3236
:hidden:

docs/source/api/handlers.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ Index
4242
- :class:`PollHandler`
4343
- :class:`DisconnectHandler`
4444
- :class:`RawUpdateHandler`
45+
- :class:`StoryHandler`
46+
- :class:`ChatBoostHandler`
47+
- :class:`BusinessConnectionHandler`
4548

4649
-----
4750

@@ -60,3 +63,6 @@ Details
6063
.. autoclass:: PollHandler()
6164
.. autoclass:: DisconnectHandler()
6265
.. autoclass:: RawUpdateHandler()
66+
.. autoclass:: StoryHandler()
67+
.. autoclass:: ChatBoostHandler()
68+
.. autoclass:: BusinessConnectionHandler()

docs/source/index.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,19 @@ Meta
149149
topics/test-servers
150150
topics/advanced-usage
151151
topics/voice-calls
152+
topics/stories
153+
topics/telegram-stars
154+
topics/star-gifts
155+
topics/business-features
156+
topics/boosts-and-giveaways
157+
topics/todo-lists
158+
topics/saved-messages
159+
topics/conference-calls
160+
topics/monoforum
161+
topics/suggested-posts
162+
topics/privacy-settings
163+
topics/keyboard-styles
164+
topics/miscellaneous
152165

153166
.. toctree::
154167
:hidden:

0 commit comments

Comments
 (0)