Skip to content

Commit b9988e5

Browse files
committed
resolve conflicts
2 parents 9b5d09f + 600ffed commit b9988e5

112 files changed

Lines changed: 8305 additions & 3018 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.

.github/workflows/python.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
strategy:
1010
matrix:
1111
os: [ubuntu-latest, macos-latest]
12-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
12+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
1313

1414
steps:
1515
- uses: actions/checkout@v4

Makefile

Lines changed: 31 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,55 @@
11
VENV := venv
22
PYTHON := $(VENV)/bin/python
3+
PIP := $(PYTHON) -m pip
34
TAG = v$(shell grep -E '__version__ = ".*"' pyrogram/__init__.py | cut -d\" -f2)
45

56
RM := rm -rf
67

7-
.PHONY: venv clean-build clean-api clean-docs clean api docs build tag dtag
8+
GREEN := \033[0;32m
9+
RED := \033[0;31m
10+
YELLOW := \033[0;33m
11+
BLUE := \033[0;34m
12+
BOLD := \033[1m
13+
RESET := \033[0m
14+
15+
.PHONY: venv venv-docs clean-venv clean-build clean-api clean-docs clean api docs docs-archive build tag dtag
816

917
venv:
10-
python3 -m venv $(VENV)
11-
$(PYTHON) -m pip install -U pip wheel setuptools
12-
$(PYTHON) -m pip install -U -e .[docs]
13-
@echo "Created venv with $$($(PYTHON) --version)"
18+
@if [ ! -d "$(VENV)" ]; then \
19+
python3 -m venv $(VENV); \
20+
$(PIP) install -U pip wheel setuptools; \
21+
fi
22+
23+
$(PIP) install -U -e .
24+
@printf "$(YELLOW)Created venv with %s$(RESET)\n" "$$($(PYTHON) --version)"
25+
26+
venv-docs:
27+
@if [ ! -d "$(VENV)" ]; then \
28+
python3 -m venv $(VENV); \
29+
$(PIP) install -U pip wheel setuptools; \
30+
fi
31+
32+
$(PIP) install -U -e .[docs]
33+
@printf "$(YELLOW)Created docs venv with %s$(RESET)\n" "$$($(PYTHON) --version)"
1434

1535
clean-venv:
1636
$(RM) $(VENV)
17-
@echo "Cleaned venv directory"
37+
@printf "$(YELLOW)Cleaned venv directory$(RESET)\n"
1838

1939
clean-build:
2040
$(RM) *.egg-info build dist
21-
@echo "Cleaned build directory"
41+
@printf "$(YELLOW)Cleaned build directory$(RESET)\n"
2242

2343
clean-api:
2444
$(RM) pyrogram/errors/exceptions pyrogram/raw/all.py pyrogram/raw/base pyrogram/raw/functions pyrogram/raw/types
25-
@echo "Cleaned api directory"
45+
@printf "$(YELLOW)Cleaned api directory$(RESET)\n"
2646

2747
clean-docs:
2848
$(RM) docs/build docs/source/api/bound-methods docs/source/api/methods docs/source/api/types docs/source/api/enums docs/source/telegram
29-
@echo "Cleaned docs directory"
49+
@printf "$(YELLOW)Cleaned docs directory$(RESET)\n"
3050

3151
clean: clean-venv clean-build clean-api clean-docs
32-
@echo "Cleaned all directories"
52+
@printf "$(GREEN)Cleaned all directories$(RESET)\n"
3353

3454
api:
3555
cd compiler/api && ../../$(PYTHON) compiler.py
@@ -39,7 +59,7 @@ docs:
3959
cd compiler/docs && ../../$(PYTHON) compiler.py
4060
$(VENV)/bin/sphinx-build -b dirhtml "docs/source" "docs/build/html" -j auto
4161

42-
archive-docs:
62+
docs-archive:
4363
cd docs/build/html && zip -r ../docs.zip ./
4464

4565
build:

README.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
<br>
66
<b>Telegram MTProto API Framework for Python</b>
77
<br>
8-
<a href="https://kurigram.live">
8+
<a href="https://kurigram.icu">
99
Homepage
1010
</a>
1111
12-
<a href="https://docs.kurigram.live">
12+
<a href="https://docs.kurigram.icu">
1313
Documentation
1414
</a>
1515
@@ -24,9 +24,6 @@
2424

2525
## Pyrogram
2626

27-
> [!NOTE]
28-
> Unfortunately, the original pyrogram is no longer supported. I will try to be your @delivrance.
29-
3027
> Elegant, modern and asynchronous Telegram MTProto API framework in Python for users and bots
3128
3229
``` python
@@ -43,7 +40,7 @@ async def hello(client, message):
4340
app.run()
4441
```
4542

46-
**Pyrogram** is a modern, elegant and asynchronous [MTProto API](https://docs.kurigram.live/topics/mtproto-vs-botapi)
43+
**Pyrogram** is a modern, elegant and asynchronous [MTProto API](https://docs.kurigram.icu/topics/mtproto-vs-botapi)
4744
framework. It enables you to easily interact with the main Telegram API through a user account (custom client) or a bot
4845
identity (bot API alternative) using Python.
4946

@@ -74,12 +71,12 @@ pip3 install kurigram
7471

7572
Dev version
7673
``` bash
77-
pip3 install https://github.com/KurimuzonAkuma/pyrogram/archive/dev.zip --force-reinstall
74+
pip3 install https://github.com/KurimuzonAkuma/kurigram/archive/dev.zip --force-reinstall
7875
```
7976

8077
### Resources
8178

82-
- Check out the [docs](https://docs.kurigram.live) to learn more about Pyrogram, get started right
79+
- Check out the [docs](https://docs.kurigram.icu) to learn more about Pyrogram, get started right
8380
away and discover more in-depth material for building your client applications.
8481
- Join the [official channel](https://t.me/kurigram_news) and stay tuned for news, updates and announcements.
8582
- Join the [official chat](https://t.me/kurigram_chat) to communicate with people.

compiler/api/source/main_api.tl

Lines changed: 118 additions & 31 deletions
Large diffs are not rendered by default.

compiler/api/template/type.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ else:
2323
raise TypeError("Base types can only be used for type checking purposes: "
2424
"you tried to use a base type instance as argument, "
2525
"but you need to instantiate one of its constructors instead. "
26-
"More info: https://docs.kurigram.live/telegram/base/{doc_name}")
26+
"More info: https://docs.kurigram.icu/telegram/base/{doc_name}")

compiler/docs/compiler.py

Lines changed: 80 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,6 @@ def get_title_list(s: str) -> list:
298298
get_direct_messages_chat_topic_history
299299
delete_direct_messages_chat_topic_history
300300
set_direct_messages_chat_topic_is_marked_as_unread
301-
send_web_page
302301
start_bot
303302
delete_chat_history
304303
send_paid_media
@@ -307,6 +306,7 @@ def get_title_list(s: str) -> list:
307306
approve_suggested_post
308307
decline_suggested_post
309308
add_checklist_tasks
309+
summarize_message
310310
""",
311311
chats="""
312312
Chats
@@ -362,6 +362,7 @@ def get_title_list(s: str) -> list:
362362
get_forum_topics
363363
get_forum_topics_by_id
364364
update_color
365+
set_upgraded_gift_colors
365366
update_chat_notifications
366367
toggle_forum_topics
367368
create_folder_invite_link
@@ -444,24 +445,30 @@ def get_title_list(s: str) -> list:
444445
convert_gift_to_stars
445446
get_available_gifts
446447
get_chat_gifts
448+
get_gift_auction_state
447449
get_chat_gifts_count
448450
add_collection_gifts
449451
create_gift_collection
450452
delete_gift_collection
451453
drop_gift_original_details
454+
edit_star_subscription
452455
get_gift_collections
453456
remove_collection_gifts
454457
reorder_collection_gifts
455458
reorder_gift_collections
459+
reuse_star_subscription
456460
set_gift_collection_name
457461
get_gift_upgrade_preview
462+
get_gift_upgrade_variants
458463
get_payment_form
459464
get_stars_balance
460465
get_ton_balance
461466
get_upgraded_gift_value_info
462467
get_upgraded_gift
463468
gift_premium_with_stars
464469
hide_gift
470+
increase_gift_auction_bid
471+
place_gift_auction_bid
465472
search_gifts_for_resale
466473
send_gift
467474
send_payment_form
@@ -472,6 +479,8 @@ def get_title_list(s: str) -> list:
472479
suggest_birthday
473480
transfer_gift
474481
upgrade_gift
482+
process_gift_purchase_offer
483+
send_gift_purchase_offer
475484
""",
476485
phone="""
477486
Phone
@@ -497,6 +506,7 @@ def get_title_list(s: str) -> list:
497506
set_bot_commands
498507
get_bot_commands
499508
delete_bot_commands
509+
edit_user_star_subscription
500510
set_bot_default_privileges
501511
get_bot_default_privileges
502512
set_chat_menu_button
@@ -739,14 +749,15 @@ def get_title_list(s: str) -> list:
739749
Invoice
740750
LinkPreviewOptions
741751
GiftCollection
742-
GiftCode
752+
PremiumGiftCode
743753
GiftPurchaseLimit
744754
GiftResaleParameters
745755
GiftResalePrice
746756
GiftResalePriceStar
747757
GiftResalePriceTon
748758
GiftUpgradePreview
749759
GiftUpgradePrice
760+
GiftUpgradeVariants
750761
CheckedGiftCode
751762
ChecklistTask
752763
ChecklistTasksAdded
@@ -791,13 +802,23 @@ def get_title_list(s: str) -> list:
791802
GiftedTon
792803
UpgradedGiftValueInfo
793804
UpgradedGiftAttributeId
805+
UpgradedGiftPurchaseOffer
806+
UpgradedGiftPurchaseOfferRejected
794807
UpgradedGiftAttributeIdModel
795808
UpgradedGiftAttributeIdSymbol
796809
UpgradedGiftAttributeIdBackdrop
810+
UpgradedGiftOriginalDetails
797811
InputChatPhoto
798812
InputChatPhotoPrevious
799813
InputChatPhotoStatic
800814
InputChatPhotoAnimation
815+
AuctionBid
816+
AuctionRound
817+
AuctionState
818+
AuctionStateActive
819+
AuctionStateFinished
820+
GiftAuctionState
821+
GiftAuction
801822
""",
802823
bot_keyboards="""
803824
Bot keyboards
@@ -945,46 +966,76 @@ def get_title_list(s: str) -> list:
945966
categories = dict(
946967
message="""
947968
Message
948-
Message.click
949-
Message.delete
950-
Message.download
951-
Message.forward
952-
Message.copy
953-
Message.copy_media_group
954-
Message.pin
955-
Message.unpin
956-
Message.edit
957-
Message.edit_text
958-
Message.edit_caption
959-
Message.edit_media
960-
Message.edit_checklist
961-
Message.edit_reply_markup
962-
Message.reply
963-
Message.reply_text
964969
Message.reply_animation
970+
Message.answer_animation
965971
Message.reply_audio
966-
Message.reply_cached_media
967-
Message.reply_chat_action
972+
Message.answer_audio
968973
Message.reply_contact
974+
Message.answer_contact
969975
Message.reply_document
976+
Message.answer_document
970977
Message.reply_game
971-
Message.reply_inline_bot_result
978+
Message.answer_game
979+
Message.reply_invoice
980+
Message.answer_invoice
972981
Message.reply_location
982+
Message.answer_location
973983
Message.reply_media_group
984+
Message.answer_media_group
985+
Message.reply
986+
Message.reply_text
987+
Message.answer
974988
Message.reply_photo
989+
Message.answer_photo
975990
Message.reply_poll
991+
Message.answer_poll
992+
Message.reply_dice
993+
Message.answer_dice
976994
Message.reply_sticker
995+
Message.answer_sticker
977996
Message.reply_venue
997+
Message.answer_venue
978998
Message.reply_video
999+
Message.answer_video
9791000
Message.reply_video_note
1001+
Message.answer_video_note
9801002
Message.reply_voice
981-
Message.reply_web_page
982-
Message.reply_checklist
1003+
Message.answer_voice
1004+
Message.reply_paid_media
1005+
Message.answer_paid_media
1006+
Message.reply_cached_media
1007+
Message.answer_cached_media
9831008
Message.get_media_group
1009+
Message.reply_chat_action
1010+
Message.reply_inline_bot_result
1011+
Message.answer_inline_bot_result
1012+
Message.reply_checklist
1013+
Message.answer_checklist
1014+
Message.edit_text
1015+
Message.edit
1016+
Message.edit_caption
1017+
Message.edit_media
1018+
Message.edit_checklist
1019+
Message.edit_reply_markup
1020+
Message.edit_live_location
1021+
Message.stop_live_location
1022+
Message.forward
1023+
Message.copy
1024+
Message.copy_media_group
1025+
Message.delete
1026+
Message.click
9841027
Message.react
1028+
Message.retract_vote
1029+
Message.download
1030+
Message.vote
1031+
Message.pin
1032+
Message.unpin
9851033
Message.read
9861034
Message.view
9871035
Message.pay
1036+
Message.accept_gift_purchase_offer
1037+
Message.reject_gift_purchase_offer
1038+
Message.summarize
9881039
""",
9891040
chat="""
9901041
Chat
@@ -1092,6 +1143,8 @@ def get_title_list(s: str) -> list:
10921143
Gift.wear
10931144
Gift.buy
10941145
Gift.send
1146+
Gift.get_auction_state
1147+
Gift.send_purchase_offer
10951148
""",
10961149
animation="""
10971150
Animation
@@ -1149,6 +1202,7 @@ def get_title_list(s: str) -> list:
11491202
MessageServiceType
11501203
MessagesFilter
11511204
NextCodeType
1205+
PaidReactionPrivacy
11521206
ParseMode
11531207
PhoneCallDiscardReason
11541208
PollType
@@ -1159,10 +1213,13 @@ def get_title_list(s: str) -> list:
11591213
SentCodeType
11601214
StoriesPrivacyRules
11611215
UserStatus
1216+
UpgradedGiftOrigin
11621217
GiftAttributeType
11631218
MediaAreaType
11641219
PrivacyRuleType
11651220
GiftForResaleOrder
1221+
GiftPurchaseOfferState
1222+
GiftType
11661223
PaymentFormType
11671224
StickerType
11681225
MaskPointType

compiler/errors/source/400_BAD_REQUEST.tsv

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,7 @@ INPUT_LAYER_INVALID The specified layer is invalid.
266266
INPUT_METHOD_INVALID The method invoked is invalid in the current schema.
267267
INPUT_PEERS_EMPTY The specified peer array is empty.
268268
INPUT_REQUEST_TOO_LONG The request payload is too long.
269+
INPUT_STARS_NANOS_INVALID The specified stars nano amount is invalid.
269270
INPUT_TEXT_EMPTY The specified text is empty.
270271
INPUT_TEXT_TOO_LONG The specified text is too long.
271272
INPUT_USER_DEACTIVATED The target user has been deleted/deactivated.
@@ -481,8 +482,10 @@ SRP_A_INVALID The specified inputCheckPasswordSRP.A value is invalid.
481482
SRP_ID_INVALID Invalid SRP ID provided.
482483
SRP_PASSWORD_CHANGED The password has changed.
483484
STARGIFT_ALREADY_CONVERTED The provided star gift already converted to stars.
485+
STARGIFT_ALREADY_TRANSFERRED The provided star gift is already transferred.
484486
STARGIFT_ALREADY_UPGRADED This star gift was already upgraded before.
485487
STARGIFT_CONVERT_TOO_OLD This gift can no longer be converted into stars.
488+
STARGIFT_EXPORT_UNAVAILABLE This gift is not available for export yet.
486489
STARGIFT_INVALID The passed [inputInvoiceStarGift](https://core.telegram.org/constructor/inputInvoiceStarGift) is invalid.
487490
STARGIFT_MESSAGE_INVALID The provided message for this gift is invalid.
488491
STARGIFT_NOT_FOUND The specified star gift was not found.

0 commit comments

Comments
 (0)