botapi-py 1.5.7__tar.gz → 1.5.8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {botapi_py-1.5.7 → botapi_py-1.5.8}/PKG-INFO +1 -1
- {botapi_py-1.5.7 → botapi_py-1.5.8}/pyproject.toml +1 -1
- {botapi_py-1.5.7 → botapi_py-1.5.8}/src/botapi/methods.py +126 -52
- {botapi_py-1.5.7 → botapi_py-1.5.8}/src/botapi/types.py +116 -26
- {botapi_py-1.5.7 → botapi_py-1.5.8}/src/botapi/__init__.py +0 -0
- {botapi_py-1.5.7 → botapi_py-1.5.8}/src/botapi/__init__.pyi +0 -0
- {botapi_py-1.5.7 → botapi_py-1.5.8}/src/botapi/bot.py +0 -0
- {botapi_py-1.5.7 → botapi_py-1.5.8}/src/botapi/core.py +0 -0
- {botapi_py-1.5.7 → botapi_py-1.5.8}/src/botapi/dispatchers/__init__.py +0 -0
- {botapi_py-1.5.7 → botapi_py-1.5.8}/src/botapi/dispatchers/__init__.pyi +0 -0
- {botapi_py-1.5.7 → botapi_py-1.5.8}/src/botapi/dispatchers/common.py +0 -0
- {botapi_py-1.5.7 → botapi_py-1.5.8}/src/botapi/dispatchers/get_updates_handler.py +0 -0
- {botapi_py-1.5.7 → botapi_py-1.5.8}/src/botapi/dispatchers/redis_pubsub_handler.py +0 -0
- {botapi_py-1.5.7 → botapi_py-1.5.8}/src/botapi/enums.py +0 -0
- {botapi_py-1.5.7 → botapi_py-1.5.8}/src/botapi/errors.py +0 -0
- {botapi_py-1.5.7 → botapi_py-1.5.8}/src/botapi/internals.py +0 -0
|
@@ -66,6 +66,10 @@ from .types import (
|
|
|
66
66
|
WebAppData,
|
|
67
67
|
ProximityAlertTriggered,
|
|
68
68
|
MessageAutoDeleteTimerChanged,
|
|
69
|
+
ManagedBotCreated,
|
|
70
|
+
ManagedBotUpdated,
|
|
71
|
+
PollOptionAdded,
|
|
72
|
+
PollOptionDeleted,
|
|
69
73
|
ChatBoostAdded,
|
|
70
74
|
BackgroundFill,
|
|
71
75
|
_BackgroundFill,
|
|
@@ -119,6 +123,7 @@ from .types import (
|
|
|
119
123
|
KeyboardButton,
|
|
120
124
|
KeyboardButtonRequestUsers,
|
|
121
125
|
KeyboardButtonRequestChat,
|
|
126
|
+
KeyboardButtonRequestManagedBot,
|
|
122
127
|
KeyboardButtonPollType,
|
|
123
128
|
ReplyKeyboardRemove,
|
|
124
129
|
InlineKeyboardMarkup,
|
|
@@ -225,6 +230,9 @@ from .types import (
|
|
|
225
230
|
BusinessBotRights,
|
|
226
231
|
BusinessConnection,
|
|
227
232
|
BusinessMessagesDeleted,
|
|
233
|
+
SentWebAppMessage,
|
|
234
|
+
PreparedInlineMessage,
|
|
235
|
+
PreparedKeyboardButton,
|
|
228
236
|
ResponseParameters,
|
|
229
237
|
InputMedia,
|
|
230
238
|
_InputMedia,
|
|
@@ -288,8 +296,6 @@ from .types import (
|
|
|
288
296
|
InputContactMessageContent,
|
|
289
297
|
InputInvoiceMessageContent,
|
|
290
298
|
ChosenInlineResult,
|
|
291
|
-
SentWebAppMessage,
|
|
292
|
-
PreparedInlineMessage,
|
|
293
299
|
LabeledPrice,
|
|
294
300
|
Invoice,
|
|
295
301
|
ShippingAddress,
|
|
@@ -1325,13 +1331,20 @@ class Methods(core.BaseBot):
|
|
|
1325
1331
|
is_anonymous: Optional[bool] = None,
|
|
1326
1332
|
type: Optional[str] = None,
|
|
1327
1333
|
allows_multiple_answers: Optional[bool] = None,
|
|
1328
|
-
|
|
1334
|
+
allows_revoting: Optional[bool] = None,
|
|
1335
|
+
shuffle_options: Optional[bool] = None,
|
|
1336
|
+
allow_adding_options: Optional[bool] = None,
|
|
1337
|
+
hide_results_until_closes: Optional[bool] = None,
|
|
1338
|
+
correct_option_ids: Optional[List[int]] = None,
|
|
1329
1339
|
explanation: Optional[str] = None,
|
|
1330
1340
|
explanation_parse_mode: Optional[str] = None,
|
|
1331
1341
|
explanation_entities: Optional[List[MessageEntity]] = None,
|
|
1332
1342
|
open_period: Optional[int] = None,
|
|
1333
1343
|
close_date: Optional[int] = None,
|
|
1334
1344
|
is_closed: Optional[bool] = None,
|
|
1345
|
+
description: Optional[str] = None,
|
|
1346
|
+
description_parse_mode: Optional[str] = None,
|
|
1347
|
+
description_entities: Optional[List[MessageEntity]] = None,
|
|
1335
1348
|
disable_notification: Optional[bool] = None,
|
|
1336
1349
|
protect_content: Optional[bool] = None,
|
|
1337
1350
|
allow_paid_broadcast: Optional[bool] = None,
|
|
@@ -1357,13 +1370,20 @@ class Methods(core.BaseBot):
|
|
|
1357
1370
|
'is_anonymous': is_anonymous,
|
|
1358
1371
|
'type': type,
|
|
1359
1372
|
'allows_multiple_answers': allows_multiple_answers,
|
|
1360
|
-
'
|
|
1373
|
+
'allows_revoting': allows_revoting,
|
|
1374
|
+
'shuffle_options': shuffle_options,
|
|
1375
|
+
'allow_adding_options': allow_adding_options,
|
|
1376
|
+
'hide_results_until_closes': hide_results_until_closes,
|
|
1377
|
+
'correct_option_ids': correct_option_ids,
|
|
1361
1378
|
'explanation': explanation,
|
|
1362
1379
|
'explanation_parse_mode': explanation_parse_mode,
|
|
1363
1380
|
'explanation_entities': explanation_entities,
|
|
1364
1381
|
'open_period': open_period,
|
|
1365
1382
|
'close_date': close_date,
|
|
1366
1383
|
'is_closed': is_closed,
|
|
1384
|
+
'description': description,
|
|
1385
|
+
'description_parse_mode': description_parse_mode,
|
|
1386
|
+
'description_entities': description_entities,
|
|
1367
1387
|
'disable_notification': disable_notification,
|
|
1368
1388
|
'protect_content': protect_content,
|
|
1369
1389
|
'allow_paid_broadcast': allow_paid_broadcast,
|
|
@@ -2696,6 +2716,41 @@ class Methods(core.BaseBot):
|
|
|
2696
2716
|
})
|
|
2697
2717
|
return BusinessConnection.model_validate(response)
|
|
2698
2718
|
|
|
2719
|
+
async def get_managed_bot_token(
|
|
2720
|
+
self,
|
|
2721
|
+
user_id: int,
|
|
2722
|
+
) -> str:
|
|
2723
|
+
'''
|
|
2724
|
+
Use this method to get the token of
|
|
2725
|
+
a managed bot. Returns the token as String
|
|
2726
|
+
on success.
|
|
2727
|
+
|
|
2728
|
+
Reference: https://core.telegram.org/bots/api#getmanagedbottoken
|
|
2729
|
+
'''
|
|
2730
|
+
|
|
2731
|
+
response = await self._send_request('getManagedBotToken', {
|
|
2732
|
+
'user_id': user_id,
|
|
2733
|
+
})
|
|
2734
|
+
return StrAdapter.validate_python(response)
|
|
2735
|
+
|
|
2736
|
+
async def replace_managed_bot_token(
|
|
2737
|
+
self,
|
|
2738
|
+
user_id: int,
|
|
2739
|
+
) -> str:
|
|
2740
|
+
'''
|
|
2741
|
+
Use this method to revoke the current token
|
|
2742
|
+
of a managed bot and generate a new
|
|
2743
|
+
one. Returns the new token as String on
|
|
2744
|
+
success.
|
|
2745
|
+
|
|
2746
|
+
Reference: https://core.telegram.org/bots/api#replacemanagedbottoken
|
|
2747
|
+
'''
|
|
2748
|
+
|
|
2749
|
+
response = await self._send_request('replaceManagedBotToken', {
|
|
2750
|
+
'user_id': user_id,
|
|
2751
|
+
})
|
|
2752
|
+
return StrAdapter.validate_python(response)
|
|
2753
|
+
|
|
2699
2754
|
async def set_my_commands(
|
|
2700
2755
|
self,
|
|
2701
2756
|
commands: List[BotCommand],
|
|
@@ -3600,6 +3655,73 @@ class Methods(core.BaseBot):
|
|
|
3600
3655
|
})
|
|
3601
3656
|
return BoolAdapter.validate_python(response)
|
|
3602
3657
|
|
|
3658
|
+
async def answer_web_app_query(
|
|
3659
|
+
self,
|
|
3660
|
+
web_app_query_id: str,
|
|
3661
|
+
result: _InlineQueryResult,
|
|
3662
|
+
) -> SentWebAppMessage:
|
|
3663
|
+
'''
|
|
3664
|
+
Use this method to set the result of
|
|
3665
|
+
an interaction with a Web App and send
|
|
3666
|
+
a corresponding message on behalf of the user
|
|
3667
|
+
to the chat from which the query originated.
|
|
3668
|
+
On success, a SentWebAppMessage object is returned.
|
|
3669
|
+
|
|
3670
|
+
Reference: https://core.telegram.org/bots/api#answerwebappquery
|
|
3671
|
+
'''
|
|
3672
|
+
|
|
3673
|
+
response = await self._send_request('answerWebAppQuery', {
|
|
3674
|
+
'web_app_query_id': web_app_query_id,
|
|
3675
|
+
'result': result,
|
|
3676
|
+
})
|
|
3677
|
+
return SentWebAppMessage.model_validate(response)
|
|
3678
|
+
|
|
3679
|
+
async def save_prepared_inline_message(
|
|
3680
|
+
self,
|
|
3681
|
+
user_id: int,
|
|
3682
|
+
result: _InlineQueryResult,
|
|
3683
|
+
allow_user_chats: Optional[bool] = None,
|
|
3684
|
+
allow_bot_chats: Optional[bool] = None,
|
|
3685
|
+
allow_group_chats: Optional[bool] = None,
|
|
3686
|
+
allow_channel_chats: Optional[bool] = None,
|
|
3687
|
+
) -> PreparedInlineMessage:
|
|
3688
|
+
'''
|
|
3689
|
+
Stores a message that can be sent by
|
|
3690
|
+
a user of a Mini App. Returns a
|
|
3691
|
+
PreparedInlineMessage object.
|
|
3692
|
+
|
|
3693
|
+
Reference: https://core.telegram.org/bots/api#savepreparedinlinemessage
|
|
3694
|
+
'''
|
|
3695
|
+
|
|
3696
|
+
response = await self._send_request('savePreparedInlineMessage', {
|
|
3697
|
+
'user_id': user_id,
|
|
3698
|
+
'result': result,
|
|
3699
|
+
'allow_user_chats': allow_user_chats,
|
|
3700
|
+
'allow_bot_chats': allow_bot_chats,
|
|
3701
|
+
'allow_group_chats': allow_group_chats,
|
|
3702
|
+
'allow_channel_chats': allow_channel_chats,
|
|
3703
|
+
})
|
|
3704
|
+
return PreparedInlineMessage.model_validate(response)
|
|
3705
|
+
|
|
3706
|
+
async def save_prepared_keyboard_button(
|
|
3707
|
+
self,
|
|
3708
|
+
user_id: int,
|
|
3709
|
+
button: KeyboardButton,
|
|
3710
|
+
) -> PreparedKeyboardButton:
|
|
3711
|
+
'''
|
|
3712
|
+
Stores a keyboard button that can be used
|
|
3713
|
+
by a user within a Mini App. Returns
|
|
3714
|
+
a PreparedKeyboardButton object.
|
|
3715
|
+
|
|
3716
|
+
Reference: https://core.telegram.org/bots/api#savepreparedkeyboardbutton
|
|
3717
|
+
'''
|
|
3718
|
+
|
|
3719
|
+
response = await self._send_request('savePreparedKeyboardButton', {
|
|
3720
|
+
'user_id': user_id,
|
|
3721
|
+
'button': button,
|
|
3722
|
+
})
|
|
3723
|
+
return PreparedKeyboardButton.model_validate(response)
|
|
3724
|
+
|
|
3603
3725
|
async def edit_message_text(
|
|
3604
3726
|
self,
|
|
3605
3727
|
text: str,
|
|
@@ -4352,54 +4474,6 @@ class Methods(core.BaseBot):
|
|
|
4352
4474
|
})
|
|
4353
4475
|
return BoolAdapter.validate_python(response)
|
|
4354
4476
|
|
|
4355
|
-
async def answer_web_app_query(
|
|
4356
|
-
self,
|
|
4357
|
-
web_app_query_id: str,
|
|
4358
|
-
result: _InlineQueryResult,
|
|
4359
|
-
) -> SentWebAppMessage:
|
|
4360
|
-
'''
|
|
4361
|
-
Use this method to set the result of
|
|
4362
|
-
an interaction with a Web App and send
|
|
4363
|
-
a corresponding message on behalf of the user
|
|
4364
|
-
to the chat from which the query originated.
|
|
4365
|
-
On success, a SentWebAppMessage object is returned.
|
|
4366
|
-
|
|
4367
|
-
Reference: https://core.telegram.org/bots/api#answerwebappquery
|
|
4368
|
-
'''
|
|
4369
|
-
|
|
4370
|
-
response = await self._send_request('answerWebAppQuery', {
|
|
4371
|
-
'web_app_query_id': web_app_query_id,
|
|
4372
|
-
'result': result,
|
|
4373
|
-
})
|
|
4374
|
-
return SentWebAppMessage.model_validate(response)
|
|
4375
|
-
|
|
4376
|
-
async def save_prepared_inline_message(
|
|
4377
|
-
self,
|
|
4378
|
-
user_id: int,
|
|
4379
|
-
result: _InlineQueryResult,
|
|
4380
|
-
allow_user_chats: Optional[bool] = None,
|
|
4381
|
-
allow_bot_chats: Optional[bool] = None,
|
|
4382
|
-
allow_group_chats: Optional[bool] = None,
|
|
4383
|
-
allow_channel_chats: Optional[bool] = None,
|
|
4384
|
-
) -> PreparedInlineMessage:
|
|
4385
|
-
'''
|
|
4386
|
-
Stores a message that can be sent by
|
|
4387
|
-
a user of a Mini App. Returns a
|
|
4388
|
-
PreparedInlineMessage object.
|
|
4389
|
-
|
|
4390
|
-
Reference: https://core.telegram.org/bots/api#savepreparedinlinemessage
|
|
4391
|
-
'''
|
|
4392
|
-
|
|
4393
|
-
response = await self._send_request('savePreparedInlineMessage', {
|
|
4394
|
-
'user_id': user_id,
|
|
4395
|
-
'result': result,
|
|
4396
|
-
'allow_user_chats': allow_user_chats,
|
|
4397
|
-
'allow_bot_chats': allow_bot_chats,
|
|
4398
|
-
'allow_group_chats': allow_group_chats,
|
|
4399
|
-
'allow_channel_chats': allow_channel_chats,
|
|
4400
|
-
})
|
|
4401
|
-
return PreparedInlineMessage.model_validate(response)
|
|
4402
|
-
|
|
4403
4477
|
async def send_invoice(
|
|
4404
4478
|
self,
|
|
4405
4479
|
chat_id: Union[int, str],
|
|
@@ -46,6 +46,7 @@ class Message(MaybeInaccessibleMessage):
|
|
|
46
46
|
quote: Optional[TextQuote] = Field(default=None)
|
|
47
47
|
reply_to_story: Optional[Story] = Field(default=None)
|
|
48
48
|
reply_to_checklist_task_id: Optional[int] = Field(default=None)
|
|
49
|
+
reply_to_poll_option_id: Optional[str] = Field(default=None)
|
|
49
50
|
via_bot: Optional[User] = Field(default=None)
|
|
50
51
|
edit_date: Optional[int] = Field(default=None)
|
|
51
52
|
has_protected_content: Optional[bool] = Field(default=None)
|
|
@@ -121,7 +122,10 @@ class Message(MaybeInaccessibleMessage):
|
|
|
121
122
|
giveaway: Optional[Giveaway] = Field(default=None)
|
|
122
123
|
giveaway_winners: Optional[GiveawayWinners] = Field(default=None)
|
|
123
124
|
giveaway_completed: Optional[GiveawayCompleted] = Field(default=None)
|
|
125
|
+
managed_bot_created: Optional[ManagedBotCreated] = Field(default=None)
|
|
124
126
|
paid_message_price_changed: Optional[PaidMessagePriceChanged] = Field(default=None)
|
|
127
|
+
poll_option_added: Optional[PollOptionAdded] = Field(default=None)
|
|
128
|
+
poll_option_deleted: Optional[PollOptionDeleted] = Field(default=None)
|
|
125
129
|
suggested_post_approved: Optional[SuggestedPostApproved] = Field(default=None)
|
|
126
130
|
suggested_post_approval_failed: Optional[SuggestedPostApprovalFailed] = Field(default=None)
|
|
127
131
|
suggested_post_declined: Optional[SuggestedPostDeclined] = Field(default=None)
|
|
@@ -2328,6 +2332,7 @@ class Update(BaseModel):
|
|
|
2328
2332
|
chat_join_request: Optional[ChatJoinRequest] = Field(default=None)
|
|
2329
2333
|
chat_boost: Optional[ChatBoostUpdated] = Field(default=None)
|
|
2330
2334
|
removed_chat_boost: Optional[ChatBoostRemoved] = Field(default=None)
|
|
2335
|
+
managed_bot: Optional[ManagedBotUpdated] = Field(default=None)
|
|
2331
2336
|
|
|
2332
2337
|
@staticmethod
|
|
2333
2338
|
def from_dict(
|
|
@@ -2377,7 +2382,8 @@ class User(BaseModel):
|
|
|
2377
2382
|
can_connect_to_business: Optional[bool] = Field(default=None)
|
|
2378
2383
|
has_main_web_app: Optional[bool] = Field(default=None)
|
|
2379
2384
|
has_topics_enabled: Optional[bool] = Field(default=None)
|
|
2380
|
-
allows_users_to_create_topics: Optional[bool] = Field(default=None)
|
|
2385
|
+
allows_users_to_create_topics: Optional[bool] = Field(default=None)
|
|
2386
|
+
can_manage_bots: Optional[bool] = Field(default=None)
|
|
2381
2387
|
|
|
2382
2388
|
class Chat(BaseModel):
|
|
2383
2389
|
'''
|
|
@@ -2564,7 +2570,8 @@ class ReplyParameters(BaseModel):
|
|
|
2564
2570
|
quote_parse_mode: Optional[str] = Field(default=None)
|
|
2565
2571
|
quote_entities: Optional[List[MessageEntity]] = Field(default=None)
|
|
2566
2572
|
quote_position: Optional[int] = Field(default=None)
|
|
2567
|
-
checklist_task_id: Optional[int] = Field(default=None)
|
|
2573
|
+
checklist_task_id: Optional[int] = Field(default=None)
|
|
2574
|
+
poll_option_id: Optional[str] = Field(default=None)
|
|
2568
2575
|
|
|
2569
2576
|
class PhotoSize(BaseModel):
|
|
2570
2577
|
'''
|
|
@@ -2746,9 +2753,13 @@ class PollOption(BaseModel):
|
|
|
2746
2753
|
Reference: https://core.telegram.org/bots/api#polloption
|
|
2747
2754
|
'''
|
|
2748
2755
|
|
|
2756
|
+
persistent_id: str
|
|
2749
2757
|
text: str
|
|
2750
2758
|
voter_count: int
|
|
2751
|
-
text_entities: Optional[List[MessageEntity]] = Field(default=None)
|
|
2759
|
+
text_entities: Optional[List[MessageEntity]] = Field(default=None)
|
|
2760
|
+
added_by_user: Optional[User] = Field(default=None)
|
|
2761
|
+
added_by_chat: Optional[Chat] = Field(default=None)
|
|
2762
|
+
addition_date: Optional[int] = Field(default=None)
|
|
2752
2763
|
|
|
2753
2764
|
class InputPollOption(BaseModel):
|
|
2754
2765
|
'''
|
|
@@ -2772,6 +2783,7 @@ class PollAnswer(BaseModel):
|
|
|
2772
2783
|
|
|
2773
2784
|
poll_id: str
|
|
2774
2785
|
option_ids: List[int]
|
|
2786
|
+
option_persistent_ids: List[str]
|
|
2775
2787
|
voter_chat: Optional[Chat] = Field(default=None)
|
|
2776
2788
|
user: Optional[User] = Field(default=None)
|
|
2777
2789
|
|
|
@@ -2790,12 +2802,15 @@ class Poll(BaseModel):
|
|
|
2790
2802
|
is_anonymous: bool
|
|
2791
2803
|
type: str
|
|
2792
2804
|
allows_multiple_answers: bool
|
|
2805
|
+
allows_revoting: bool
|
|
2793
2806
|
question_entities: Optional[List[MessageEntity]] = Field(default=None)
|
|
2794
|
-
|
|
2807
|
+
correct_option_ids: Optional[List[int]] = Field(default=None)
|
|
2795
2808
|
explanation: Optional[str] = Field(default=None)
|
|
2796
2809
|
explanation_entities: Optional[List[MessageEntity]] = Field(default=None)
|
|
2797
2810
|
open_period: Optional[int] = Field(default=None)
|
|
2798
|
-
close_date: Optional[int] = Field(default=None)
|
|
2811
|
+
close_date: Optional[int] = Field(default=None)
|
|
2812
|
+
description: Optional[str] = Field(default=None)
|
|
2813
|
+
description_entities: Optional[List[MessageEntity]] = Field(default=None)
|
|
2799
2814
|
|
|
2800
2815
|
class ChecklistTask(BaseModel):
|
|
2801
2816
|
'''
|
|
@@ -2936,6 +2951,55 @@ class MessageAutoDeleteTimerChanged(BaseModel):
|
|
|
2936
2951
|
|
|
2937
2952
|
message_auto_delete_time: int
|
|
2938
2953
|
|
|
2954
|
+
class ManagedBotCreated(BaseModel):
|
|
2955
|
+
'''
|
|
2956
|
+
This object contains information about the bot that
|
|
2957
|
+
was created to be managed by the current
|
|
2958
|
+
bot.
|
|
2959
|
+
|
|
2960
|
+
Reference: https://core.telegram.org/bots/api#managedbotcreated
|
|
2961
|
+
'''
|
|
2962
|
+
|
|
2963
|
+
bot: User
|
|
2964
|
+
|
|
2965
|
+
class ManagedBotUpdated(BaseModel):
|
|
2966
|
+
'''
|
|
2967
|
+
This object contains information about the creation, token
|
|
2968
|
+
update, or owner update of a bot that
|
|
2969
|
+
is managed by the current bot.
|
|
2970
|
+
|
|
2971
|
+
Reference: https://core.telegram.org/bots/api#managedbotupdated
|
|
2972
|
+
'''
|
|
2973
|
+
|
|
2974
|
+
user: User
|
|
2975
|
+
bot: User
|
|
2976
|
+
|
|
2977
|
+
class PollOptionAdded(BaseModel):
|
|
2978
|
+
'''
|
|
2979
|
+
Describes a service message about an option added
|
|
2980
|
+
to a poll.
|
|
2981
|
+
|
|
2982
|
+
Reference: https://core.telegram.org/bots/api#polloptionadded
|
|
2983
|
+
'''
|
|
2984
|
+
|
|
2985
|
+
option_persistent_id: str
|
|
2986
|
+
option_text: str
|
|
2987
|
+
poll_message: Optional[_MaybeInaccessibleMessage] = Field(default=None)
|
|
2988
|
+
option_text_entities: Optional[List[MessageEntity]] = Field(default=None)
|
|
2989
|
+
|
|
2990
|
+
class PollOptionDeleted(BaseModel):
|
|
2991
|
+
'''
|
|
2992
|
+
Describes a service message about an option deleted
|
|
2993
|
+
from a poll.
|
|
2994
|
+
|
|
2995
|
+
Reference: https://core.telegram.org/bots/api#polloptiondeleted
|
|
2996
|
+
'''
|
|
2997
|
+
|
|
2998
|
+
option_persistent_id: str
|
|
2999
|
+
option_text: str
|
|
3000
|
+
poll_message: Optional[_MaybeInaccessibleMessage] = Field(default=None)
|
|
3001
|
+
option_text_entities: Optional[List[MessageEntity]] = Field(default=None)
|
|
3002
|
+
|
|
2939
3003
|
class ChatBoostAdded(BaseModel):
|
|
2940
3004
|
'''
|
|
2941
3005
|
This object represents a service message about a
|
|
@@ -3450,6 +3514,7 @@ class KeyboardButton(BaseModel):
|
|
|
3450
3514
|
style: Optional[str] = Field(default=None)
|
|
3451
3515
|
request_users: Optional[KeyboardButtonRequestUsers] = Field(default=None)
|
|
3452
3516
|
request_chat: Optional[KeyboardButtonRequestChat] = Field(default=None)
|
|
3517
|
+
request_managed_bot: Optional[KeyboardButtonRequestManagedBot] = Field(default=None)
|
|
3453
3518
|
request_contact: Optional[bool] = Field(default=None)
|
|
3454
3519
|
request_location: Optional[bool] = Field(default=None)
|
|
3455
3520
|
request_poll: Optional[KeyboardButtonPollType] = Field(default=None)
|
|
@@ -3497,6 +3562,21 @@ class KeyboardButtonRequestChat(BaseModel):
|
|
|
3497
3562
|
request_username: Optional[bool] = Field(default=None)
|
|
3498
3563
|
request_photo: Optional[bool] = Field(default=None)
|
|
3499
3564
|
|
|
3565
|
+
class KeyboardButtonRequestManagedBot(BaseModel):
|
|
3566
|
+
'''
|
|
3567
|
+
This object defines the parameters for the creation
|
|
3568
|
+
of a managed bot. Information about the created
|
|
3569
|
+
bot will be shared with the bot using
|
|
3570
|
+
the update managed_bot and a Message with the
|
|
3571
|
+
field managed_bot_created.
|
|
3572
|
+
|
|
3573
|
+
Reference: https://core.telegram.org/bots/api#keyboardbuttonrequestmanagedbot
|
|
3574
|
+
'''
|
|
3575
|
+
|
|
3576
|
+
request_id: int
|
|
3577
|
+
suggested_name: Optional[str] = Field(default=None)
|
|
3578
|
+
suggested_username: Optional[str] = Field(default=None)
|
|
3579
|
+
|
|
3500
3580
|
class KeyboardButtonPollType(BaseModel):
|
|
3501
3581
|
'''
|
|
3502
3582
|
This object represents type of a poll, which
|
|
@@ -4318,6 +4398,37 @@ class BusinessMessagesDeleted(BaseModel):
|
|
|
4318
4398
|
chat: Chat
|
|
4319
4399
|
message_ids: List[int]
|
|
4320
4400
|
|
|
4401
|
+
class SentWebAppMessage(BaseModel):
|
|
4402
|
+
'''
|
|
4403
|
+
Describes an inline message sent by a Web
|
|
4404
|
+
App on behalf of a user.
|
|
4405
|
+
|
|
4406
|
+
Reference: https://core.telegram.org/bots/api#sentwebappmessage
|
|
4407
|
+
'''
|
|
4408
|
+
|
|
4409
|
+
inline_message_id: Optional[str] = Field(default=None)
|
|
4410
|
+
|
|
4411
|
+
class PreparedInlineMessage(BaseModel):
|
|
4412
|
+
'''
|
|
4413
|
+
Describes an inline message to be sent by
|
|
4414
|
+
a user of a Mini App.
|
|
4415
|
+
|
|
4416
|
+
Reference: https://core.telegram.org/bots/api#preparedinlinemessage
|
|
4417
|
+
'''
|
|
4418
|
+
|
|
4419
|
+
id: str
|
|
4420
|
+
expiration_date: int
|
|
4421
|
+
|
|
4422
|
+
class PreparedKeyboardButton(BaseModel):
|
|
4423
|
+
'''
|
|
4424
|
+
Describes a keyboard button to be used by
|
|
4425
|
+
a user of a Mini App.
|
|
4426
|
+
|
|
4427
|
+
Reference: https://core.telegram.org/bots/api#preparedkeyboardbutton
|
|
4428
|
+
'''
|
|
4429
|
+
|
|
4430
|
+
id: str
|
|
4431
|
+
|
|
4321
4432
|
class ResponseParameters(BaseModel):
|
|
4322
4433
|
'''
|
|
4323
4434
|
Describes why a request was unsuccessful.
|
|
@@ -4473,27 +4584,6 @@ class ChosenInlineResult(BaseModel):
|
|
|
4473
4584
|
location: Optional[Location] = Field(default=None)
|
|
4474
4585
|
inline_message_id: Optional[str] = Field(default=None)
|
|
4475
4586
|
|
|
4476
|
-
class SentWebAppMessage(BaseModel):
|
|
4477
|
-
'''
|
|
4478
|
-
Describes an inline message sent by a Web
|
|
4479
|
-
App on behalf of a user.
|
|
4480
|
-
|
|
4481
|
-
Reference: https://core.telegram.org/bots/api#sentwebappmessage
|
|
4482
|
-
'''
|
|
4483
|
-
|
|
4484
|
-
inline_message_id: Optional[str] = Field(default=None)
|
|
4485
|
-
|
|
4486
|
-
class PreparedInlineMessage(BaseModel):
|
|
4487
|
-
'''
|
|
4488
|
-
Describes an inline message to be sent by
|
|
4489
|
-
a user of a Mini App.
|
|
4490
|
-
|
|
4491
|
-
Reference: https://core.telegram.org/bots/api#preparedinlinemessage
|
|
4492
|
-
'''
|
|
4493
|
-
|
|
4494
|
-
id: str
|
|
4495
|
-
expiration_date: int
|
|
4496
|
-
|
|
4497
4587
|
class LabeledPrice(BaseModel):
|
|
4498
4588
|
'''
|
|
4499
4589
|
This object represents a portion of the price
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|