Skip to content

Commit c044eec

Browse files
authored
Merge branch 'KurimuzonAkuma:dev' into dev
2 parents b2fc916 + 304b084 commit c044eec

38 files changed

Lines changed: 400 additions & 79 deletions

README.md

Lines changed: 4 additions & 4 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
@@ -40,7 +40,7 @@ async def hello(client, message):
4040
app.run()
4141
```
4242

43-
**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)
4444
framework. It enables you to easily interact with the main Telegram API through a user account (custom client) or a bot
4545
identity (bot API alternative) using Python.
4646

@@ -76,7 +76,7 @@ pip3 install https://github.com/KurimuzonAkuma/kurigram/archive/dev.zip --force-
7676

7777
### Resources
7878

79-
- 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
8080
away and discover more in-depth material for building your client applications.
8181
- Join the [official channel](https://t.me/kurigram_news) and stay tuned for news, updates and announcements.
8282
- Join the [official chat](https://t.me/kurigram_chat) to communicate with people.

compiler/api/source/main_api.tl

Lines changed: 46 additions & 15 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}")

pyproject.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ keywords = [
5050
]
5151

5252
[project.urls]
53-
Homepage = "https://kurigram.live"
54-
Documentation = "https://docs.kurigram.live"
53+
Homepage = "https://kurigram.icu"
54+
Documentation = "https://docs.kurigram.icu"
5555
Source = "https://github.com/KurimuzonAkuma/pyrogram"
5656
Issues = "https://github.com/KurimuzonAkuma/pyrogram/issues"
5757
Community = "https://t.me/kurigram_chat"
@@ -67,9 +67,9 @@ dev = [
6767
]
6868

6969
docs = [
70-
"Sphinx<=8.2.3",
71-
"furo<=2025.7.19",
72-
"sphinx-autobuild<=2024.10.3",
70+
"Sphinx<=9.0.0",
71+
"shibuya<=2025.11.10",
72+
"sphinx-autobuild<=2025.8.25",
7373
"sphinx-copybutton<=0.5.2",
7474
"pygments<=2.19.2",
7575
]

pyrogram/enums/privacy_key.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,6 @@ class PrivacyKey(AutoName):
6161

6262
NO_PAID_MESSAGES = raw.types.InputPrivacyKeyNoPaidMessages
6363
"Whether people who won't have to pay to send you messages"
64+
65+
SAVED_MUSIC = raw.types.InputPrivacyKeySavedMusic
66+
"Whether people can see your saved music list"

pyrogram/methods/bots/send_invoice.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ async def send_invoice(
5858
allow_paid_broadcast: Optional[bool] = None,
5959
direct_messages_topic_id: Optional[int] = None,
6060
suggested_post_parameters: Optional["types.SuggestedPostParameters"] = None,
61+
subscription_expiration_date: Optional[int] = None,
6162
reply_markup: Optional[Union[
6263
"types.InlineKeyboardMarkup",
6364
"types.ReplyKeyboardMarkup",
@@ -169,6 +170,11 @@ async def send_invoice(
169170
suggested_post_parameters (:obj:`~pyrogram.types.SuggestedPostParameters`, *optional*):
170171
Information about the suggested post.
171172
173+
subscription_expiration_date (``int``, *optional*):
174+
Expiration date of the subscription, in Unix time.
175+
Currently the only allowed subscription period is 30*24*60*60 (1 month).
176+
For recurring payments only.
177+
172178
reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup` | :obj:`~pyrogram.types.ReplyKeyboardMarkup` | :obj:`~pyrogram.types.ReplyKeyboardRemove` | :obj:`~pyrogram.types.ForceReply`, *optional*):
173179
Additional interface options. An object for an inline keyboard, custom reply keyboard,
174180
instructions to remove reply keyboard or to force a reply from the user.
@@ -222,7 +228,9 @@ async def send_invoice(
222228
phone_to_provider=send_phone_number_to_provider,
223229
email_to_provider=send_email_to_provider,
224230
max_tip_amount=max_tip_amount,
225-
suggested_tip_amounts=suggested_tip_amounts
231+
suggested_tip_amounts=suggested_tip_amounts,
232+
recurring=True if subscription_expiration_date is not None else None,
233+
subscription_period=subscription_expiration_date
226234
),
227235
payload=payload.encode() if isinstance(payload, str) else payload,
228236
provider=provider_token,

pyrogram/methods/messages/copy_media_group.py

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -230,16 +230,4 @@ async def copy_media_group(
230230
sleep_threshold=60
231231
)
232232

233-
return await utils.parse_messages(
234-
self,
235-
raw.types.messages.Messages(
236-
messages=[m.message for m in filter(
237-
lambda u: isinstance(u, (raw.types.UpdateNewMessage,
238-
raw.types.UpdateNewChannelMessage,
239-
raw.types.UpdateNewScheduledMessage)),
240-
r.updates
241-
)],
242-
users=r.users,
243-
chats=r.chats
244-
)
245-
)
233+
return await utils.parse_messages(client=self, messages=r)

pyrogram/methods/messages/forward_messages.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ async def forward_messages(
3232
message_thread_id: int = None,
3333
disable_notification: bool = None,
3434
schedule_date: datetime = None,
35+
repeat_period: int = None,
3536
hide_sender_name: bool = None,
3637
hide_captions: bool = None,
3738
protect_content: bool = None,
@@ -69,6 +70,9 @@ async def forward_messages(
6970
schedule_date (:py:obj:`~datetime.datetime`, *optional*):
7071
Date when the message will be automatically sent.
7172
73+
repeat_period (``int``, *optional*):
74+
Period after which the message will be sent again in seconds.
75+
7276
hide_sender_name (``bool``, *optional*):
7377
If True, the original author of the message will not be shown.
7478
@@ -117,6 +121,7 @@ async def forward_messages(
117121
silent=disable_notification or None,
118122
random_id=[self.rnd_id() for _ in message_ids],
119123
schedule_date=utils.datetime_to_timestamp(schedule_date),
124+
schedule_repeat_period=repeat_period,
120125
drop_author=hide_sender_name,
121126
drop_media_captions=hide_captions,
122127
noforwards=protect_content,

pyrogram/methods/messages/send_animation.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ async def send_animation(
5151
show_caption_above_media: bool = None,
5252
reply_parameters: "types.ReplyParameters" = None,
5353
schedule_date: datetime = None,
54+
repeat_period: int = None,
5455
protect_content: bool = None,
5556
business_connection_id: str = None,
5657
allow_paid_broadcast: bool = None,
@@ -150,6 +151,9 @@ async def send_animation(
150151
schedule_date (:py:obj:`~datetime.datetime`, *optional*):
151152
Date when the message will be automatically sent.
152153
154+
repeat_period (``int``, *optional*):
155+
Period after which the message will be sent again in seconds.
156+
153157
protect_content (``bool``, *optional*):
154158
Protects the contents of the sent message from forwarding and saving.
155159
@@ -334,6 +338,7 @@ async def progress(current, total):
334338
),
335339
random_id=self.rnd_id(),
336340
schedule_date=utils.datetime_to_timestamp(schedule_date),
341+
schedule_repeat_period=repeat_period,
337342
noforwards=protect_content,
338343
allow_paid_floodskip=allow_paid_broadcast,
339344
reply_markup=await reply_markup.write(self) if reply_markup else None,

pyrogram/methods/messages/send_audio.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ async def send_audio(
4848
effect_id: int = None,
4949
reply_parameters: "types.ReplyParameters" = None,
5050
schedule_date: datetime = None,
51+
repeat_period: int = None,
5152
protect_content: bool = None,
5253
business_connection_id: str = None,
5354
allow_paid_broadcast: bool = None,
@@ -139,6 +140,9 @@ async def send_audio(
139140
schedule_date (:py:obj:`~datetime.datetime`, *optional*):
140141
Date when the message will be automatically sent.
141142
143+
repeat_period (``int``, *optional*):
144+
Period after which the message will be sent again in seconds.
145+
142146
protect_content (``bool``, *optional*):
143147
Protects the contents of the sent message from forwarding and saving.
144148
@@ -322,6 +326,7 @@ async def progress(current, total):
322326
),
323327
random_id=self.rnd_id(),
324328
schedule_date=utils.datetime_to_timestamp(schedule_date),
329+
schedule_repeat_period=repeat_period,
325330
noforwards=protect_content,
326331
allow_paid_floodskip=allow_paid_broadcast,
327332
reply_markup=await reply_markup.write(self) if reply_markup else None,

0 commit comments

Comments
 (0)