botapi-py 1.5.1__tar.gz → 1.5.3__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.1 → botapi_py-1.5.3}/PKG-INFO +1 -1
- {botapi_py-1.5.1 → botapi_py-1.5.3}/pyproject.toml +1 -1
- {botapi_py-1.5.1 → botapi_py-1.5.3}/src/botapi/methods.py +38 -17
- {botapi_py-1.5.1 → botapi_py-1.5.3}/src/botapi/types.py +44 -43
- {botapi_py-1.5.1 → botapi_py-1.5.3}/src/botapi/__init__.py +0 -0
- {botapi_py-1.5.1 → botapi_py-1.5.3}/src/botapi/__init__.pyi +0 -0
- {botapi_py-1.5.1 → botapi_py-1.5.3}/src/botapi/bot.py +0 -0
- {botapi_py-1.5.1 → botapi_py-1.5.3}/src/botapi/core.py +0 -0
- {botapi_py-1.5.1 → botapi_py-1.5.3}/src/botapi/dispatchers/__init__.py +0 -0
- {botapi_py-1.5.1 → botapi_py-1.5.3}/src/botapi/dispatchers/__init__.pyi +0 -0
- {botapi_py-1.5.1 → botapi_py-1.5.3}/src/botapi/dispatchers/common.py +0 -0
- {botapi_py-1.5.1 → botapi_py-1.5.3}/src/botapi/dispatchers/get_updates_handler.py +0 -0
- {botapi_py-1.5.1 → botapi_py-1.5.3}/src/botapi/dispatchers/redis_pubsub_handler.py +0 -0
- {botapi_py-1.5.1 → botapi_py-1.5.3}/src/botapi/enums.py +0 -0
- {botapi_py-1.5.1 → botapi_py-1.5.3}/src/botapi/errors.py +0 -0
- {botapi_py-1.5.1 → botapi_py-1.5.3}/src/botapi/internals.py +0 -0
|
@@ -20,12 +20,14 @@ from .types import (
|
|
|
20
20
|
MessageId,
|
|
21
21
|
InaccessibleMessage,
|
|
22
22
|
MaybeInaccessibleMessage,
|
|
23
|
+
_MaybeInaccessibleMessage,
|
|
23
24
|
MaybeInaccessibleMessageAdapter,
|
|
24
25
|
MessageEntity,
|
|
25
26
|
TextQuote,
|
|
26
27
|
ExternalReplyInfo,
|
|
27
28
|
ReplyParameters,
|
|
28
29
|
MessageOrigin,
|
|
30
|
+
_MessageOrigin,
|
|
29
31
|
MessageOriginAdapter,
|
|
30
32
|
MessageOriginUser,
|
|
31
33
|
MessageOriginHiddenUser,
|
|
@@ -41,6 +43,7 @@ from .types import (
|
|
|
41
43
|
Voice,
|
|
42
44
|
PaidMediaInfo,
|
|
43
45
|
PaidMedia,
|
|
46
|
+
_PaidMedia,
|
|
44
47
|
PaidMediaAdapter,
|
|
45
48
|
PaidMediaPreview,
|
|
46
49
|
PaidMediaPhoto,
|
|
@@ -64,11 +67,13 @@ from .types import (
|
|
|
64
67
|
MessageAutoDeleteTimerChanged,
|
|
65
68
|
ChatBoostAdded,
|
|
66
69
|
BackgroundFill,
|
|
70
|
+
_BackgroundFill,
|
|
67
71
|
BackgroundFillAdapter,
|
|
68
72
|
BackgroundFillSolid,
|
|
69
73
|
BackgroundFillGradient,
|
|
70
74
|
BackgroundFillFreeformGradient,
|
|
71
75
|
BackgroundType,
|
|
76
|
+
_BackgroundType,
|
|
72
77
|
BackgroundTypeAdapter,
|
|
73
78
|
BackgroundTypeFill,
|
|
74
79
|
BackgroundTypeWallpaper,
|
|
@@ -126,6 +131,7 @@ from .types import (
|
|
|
126
131
|
ChatAdministratorRights,
|
|
127
132
|
ChatMemberUpdated,
|
|
128
133
|
ChatMember,
|
|
134
|
+
_ChatMember,
|
|
129
135
|
ChatMemberAdapter,
|
|
130
136
|
ChatMemberOwner,
|
|
131
137
|
ChatMemberAdministrator,
|
|
@@ -144,6 +150,7 @@ from .types import (
|
|
|
144
150
|
StoryAreaPosition,
|
|
145
151
|
LocationAddress,
|
|
146
152
|
StoryAreaType,
|
|
153
|
+
_StoryAreaType,
|
|
147
154
|
StoryAreaTypeAdapter,
|
|
148
155
|
StoryAreaTypeLocation,
|
|
149
156
|
StoryAreaTypeSuggestedReaction,
|
|
@@ -153,6 +160,7 @@ from .types import (
|
|
|
153
160
|
StoryArea,
|
|
154
161
|
ChatLocation,
|
|
155
162
|
ReactionType,
|
|
163
|
+
_ReactionType,
|
|
156
164
|
ReactionTypeAdapter,
|
|
157
165
|
ReactionTypeEmoji,
|
|
158
166
|
ReactionTypeCustomEmoji,
|
|
@@ -173,6 +181,7 @@ from .types import (
|
|
|
173
181
|
GiftInfo,
|
|
174
182
|
UniqueGiftInfo,
|
|
175
183
|
OwnedGift,
|
|
184
|
+
_OwnedGift,
|
|
176
185
|
OwnedGiftAdapter,
|
|
177
186
|
OwnedGiftRegular,
|
|
178
187
|
OwnedGiftUnique,
|
|
@@ -181,6 +190,7 @@ from .types import (
|
|
|
181
190
|
StarAmount,
|
|
182
191
|
BotCommand,
|
|
183
192
|
BotCommandScope,
|
|
193
|
+
_BotCommandScope,
|
|
184
194
|
BotCommandScopeAdapter,
|
|
185
195
|
BotCommandScopeDefault,
|
|
186
196
|
BotCommandScopeAllPrivateChats,
|
|
@@ -193,11 +203,13 @@ from .types import (
|
|
|
193
203
|
BotDescription,
|
|
194
204
|
BotShortDescription,
|
|
195
205
|
MenuButton,
|
|
206
|
+
_MenuButton,
|
|
196
207
|
MenuButtonAdapter,
|
|
197
208
|
MenuButtonCommands,
|
|
198
209
|
MenuButtonWebApp,
|
|
199
210
|
MenuButtonDefault,
|
|
200
211
|
ChatBoostSource,
|
|
212
|
+
_ChatBoostSource,
|
|
201
213
|
ChatBoostSourceAdapter,
|
|
202
214
|
ChatBoostSourcePremium,
|
|
203
215
|
ChatBoostSourceGiftCode,
|
|
@@ -211,6 +223,7 @@ from .types import (
|
|
|
211
223
|
BusinessMessagesDeleted,
|
|
212
224
|
ResponseParameters,
|
|
213
225
|
InputMedia,
|
|
226
|
+
_InputMedia,
|
|
214
227
|
InputMediaAdapter,
|
|
215
228
|
InputMediaPhoto,
|
|
216
229
|
InputMediaVideo,
|
|
@@ -219,14 +232,17 @@ from .types import (
|
|
|
219
232
|
InputMediaDocument,
|
|
220
233
|
InputFile,
|
|
221
234
|
InputPaidMedia,
|
|
235
|
+
_InputPaidMedia,
|
|
222
236
|
InputPaidMediaAdapter,
|
|
223
237
|
InputPaidMediaPhoto,
|
|
224
238
|
InputPaidMediaVideo,
|
|
225
239
|
InputProfilePhoto,
|
|
240
|
+
_InputProfilePhoto,
|
|
226
241
|
InputProfilePhotoAdapter,
|
|
227
242
|
InputProfilePhotoStatic,
|
|
228
243
|
InputProfilePhotoAnimated,
|
|
229
244
|
InputStoryContent,
|
|
245
|
+
_InputStoryContent,
|
|
230
246
|
InputStoryContentAdapter,
|
|
231
247
|
InputStoryContentPhoto,
|
|
232
248
|
InputStoryContentVideo,
|
|
@@ -237,6 +253,7 @@ from .types import (
|
|
|
237
253
|
InlineQuery,
|
|
238
254
|
InlineQueryResultsButton,
|
|
239
255
|
InlineQueryResult,
|
|
256
|
+
_InlineQueryResult,
|
|
240
257
|
InlineQueryResultAdapter,
|
|
241
258
|
InlineQueryResultArticle,
|
|
242
259
|
InlineQueryResultPhoto,
|
|
@@ -259,6 +276,7 @@ from .types import (
|
|
|
259
276
|
InlineQueryResultCachedVoice,
|
|
260
277
|
InlineQueryResultCachedAudio,
|
|
261
278
|
InputMessageContent,
|
|
279
|
+
_InputMessageContent,
|
|
262
280
|
InputMessageContentAdapter,
|
|
263
281
|
InputTextMessageContent,
|
|
264
282
|
InputLocationMessageContent,
|
|
@@ -279,12 +297,14 @@ from .types import (
|
|
|
279
297
|
PreCheckoutQuery,
|
|
280
298
|
PaidMediaPurchased,
|
|
281
299
|
RevenueWithdrawalState,
|
|
300
|
+
_RevenueWithdrawalState,
|
|
282
301
|
RevenueWithdrawalStateAdapter,
|
|
283
302
|
RevenueWithdrawalStatePending,
|
|
284
303
|
RevenueWithdrawalStateSucceeded,
|
|
285
304
|
RevenueWithdrawalStateFailed,
|
|
286
305
|
AffiliateInfo,
|
|
287
306
|
TransactionPartner,
|
|
307
|
+
_TransactionPartner,
|
|
288
308
|
TransactionPartnerAdapter,
|
|
289
309
|
TransactionPartnerUser,
|
|
290
310
|
TransactionPartnerChat,
|
|
@@ -300,6 +320,7 @@ from .types import (
|
|
|
300
320
|
EncryptedPassportElement,
|
|
301
321
|
EncryptedCredentials,
|
|
302
322
|
PassportElementError,
|
|
323
|
+
_PassportElementError,
|
|
303
324
|
PassportElementErrorAdapter,
|
|
304
325
|
PassportElementErrorDataField,
|
|
305
326
|
PassportElementErrorFrontSide,
|
|
@@ -1062,7 +1083,7 @@ class Methods(core.BaseBot):
|
|
|
1062
1083
|
self,
|
|
1063
1084
|
chat_id: Union[int, str],
|
|
1064
1085
|
star_count: int,
|
|
1065
|
-
media: List[
|
|
1086
|
+
media: List[_InputPaidMedia],
|
|
1066
1087
|
business_connection_id: Optional[str] = None,
|
|
1067
1088
|
message_thread_id: Optional[int] = None,
|
|
1068
1089
|
direct_messages_topic_id: Optional[int] = None,
|
|
@@ -1476,7 +1497,7 @@ class Methods(core.BaseBot):
|
|
|
1476
1497
|
self,
|
|
1477
1498
|
chat_id: Union[int, str],
|
|
1478
1499
|
message_id: int,
|
|
1479
|
-
reaction: Optional[List[
|
|
1500
|
+
reaction: Optional[List[_ReactionType]] = None,
|
|
1480
1501
|
is_big: Optional[bool] = None,
|
|
1481
1502
|
) -> bool:
|
|
1482
1503
|
'''
|
|
@@ -2186,7 +2207,7 @@ class Methods(core.BaseBot):
|
|
|
2186
2207
|
async def get_chat_administrators(
|
|
2187
2208
|
self,
|
|
2188
2209
|
chat_id: Union[int, str],
|
|
2189
|
-
) -> List[
|
|
2210
|
+
) -> List[_ChatMember]:
|
|
2190
2211
|
'''
|
|
2191
2212
|
Use this method to get a list of
|
|
2192
2213
|
administrators in a chat, which aren't bots. Returns
|
|
@@ -2220,7 +2241,7 @@ class Methods(core.BaseBot):
|
|
|
2220
2241
|
self,
|
|
2221
2242
|
chat_id: Union[int, str],
|
|
2222
2243
|
user_id: int,
|
|
2223
|
-
) ->
|
|
2244
|
+
) -> _ChatMember:
|
|
2224
2245
|
'''
|
|
2225
2246
|
Use this method to get information about a
|
|
2226
2247
|
member of a chat. The method is only
|
|
@@ -2627,7 +2648,7 @@ class Methods(core.BaseBot):
|
|
|
2627
2648
|
async def set_my_commands(
|
|
2628
2649
|
self,
|
|
2629
2650
|
commands: List[BotCommand],
|
|
2630
|
-
scope: Optional[
|
|
2651
|
+
scope: Optional[_BotCommandScope] = None,
|
|
2631
2652
|
language_code: Optional[str] = None,
|
|
2632
2653
|
) -> bool:
|
|
2633
2654
|
'''
|
|
@@ -2647,7 +2668,7 @@ class Methods(core.BaseBot):
|
|
|
2647
2668
|
|
|
2648
2669
|
async def delete_my_commands(
|
|
2649
2670
|
self,
|
|
2650
|
-
scope: Optional[
|
|
2671
|
+
scope: Optional[_BotCommandScope] = None,
|
|
2651
2672
|
language_code: Optional[str] = None,
|
|
2652
2673
|
) -> bool:
|
|
2653
2674
|
'''
|
|
@@ -2668,7 +2689,7 @@ class Methods(core.BaseBot):
|
|
|
2668
2689
|
|
|
2669
2690
|
async def get_my_commands(
|
|
2670
2691
|
self,
|
|
2671
|
-
scope: Optional[
|
|
2692
|
+
scope: Optional[_BotCommandScope] = None,
|
|
2672
2693
|
language_code: Optional[str] = None,
|
|
2673
2694
|
) -> List[BotCommand]:
|
|
2674
2695
|
'''
|
|
@@ -2800,7 +2821,7 @@ class Methods(core.BaseBot):
|
|
|
2800
2821
|
async def set_chat_menu_button(
|
|
2801
2822
|
self,
|
|
2802
2823
|
chat_id: Optional[int] = None,
|
|
2803
|
-
menu_button: Optional[
|
|
2824
|
+
menu_button: Optional[_MenuButton] = None,
|
|
2804
2825
|
) -> bool:
|
|
2805
2826
|
'''
|
|
2806
2827
|
Use this method to change the bot's menu
|
|
@@ -2819,7 +2840,7 @@ class Methods(core.BaseBot):
|
|
|
2819
2840
|
async def get_chat_menu_button(
|
|
2820
2841
|
self,
|
|
2821
2842
|
chat_id: Optional[int] = None,
|
|
2822
|
-
) ->
|
|
2843
|
+
) -> _MenuButton:
|
|
2823
2844
|
'''
|
|
2824
2845
|
Use this method to get the current value
|
|
2825
2846
|
of the bot's menu button in a private
|
|
@@ -3119,7 +3140,7 @@ class Methods(core.BaseBot):
|
|
|
3119
3140
|
async def set_business_account_profile_photo(
|
|
3120
3141
|
self,
|
|
3121
3142
|
business_connection_id: str,
|
|
3122
|
-
photo:
|
|
3143
|
+
photo: _InputProfilePhoto,
|
|
3123
3144
|
is_public: Optional[bool] = None,
|
|
3124
3145
|
) -> bool:
|
|
3125
3146
|
'''
|
|
@@ -3388,7 +3409,7 @@ class Methods(core.BaseBot):
|
|
|
3388
3409
|
async def post_story(
|
|
3389
3410
|
self,
|
|
3390
3411
|
business_connection_id: str,
|
|
3391
|
-
content:
|
|
3412
|
+
content: _InputStoryContent,
|
|
3392
3413
|
active_period: int,
|
|
3393
3414
|
caption: Optional[str] = None,
|
|
3394
3415
|
parse_mode: Optional[Union[str, enums.ParseMode]] = None,
|
|
@@ -3453,7 +3474,7 @@ class Methods(core.BaseBot):
|
|
|
3453
3474
|
self,
|
|
3454
3475
|
business_connection_id: str,
|
|
3455
3476
|
story_id: int,
|
|
3456
|
-
content:
|
|
3477
|
+
content: _InputStoryContent,
|
|
3457
3478
|
caption: Optional[str] = None,
|
|
3458
3479
|
parse_mode: Optional[Union[str, enums.ParseMode]] = None,
|
|
3459
3480
|
caption_entities: Optional[List[MessageEntity]] = None,
|
|
@@ -3583,7 +3604,7 @@ class Methods(core.BaseBot):
|
|
|
3583
3604
|
|
|
3584
3605
|
async def edit_message_media(
|
|
3585
3606
|
self,
|
|
3586
|
-
media:
|
|
3607
|
+
media: _InputMedia,
|
|
3587
3608
|
business_connection_id: Optional[str] = None,
|
|
3588
3609
|
chat_id: Optional[Union[int, str]] = None,
|
|
3589
3610
|
message_id: Optional[int] = None,
|
|
@@ -4227,7 +4248,7 @@ class Methods(core.BaseBot):
|
|
|
4227
4248
|
async def answer_inline_query(
|
|
4228
4249
|
self,
|
|
4229
4250
|
inline_query_id: str,
|
|
4230
|
-
results: List[
|
|
4251
|
+
results: List[_InlineQueryResult],
|
|
4231
4252
|
cache_time: Optional[int] = None,
|
|
4232
4253
|
is_personal: Optional[bool] = None,
|
|
4233
4254
|
next_offset: Optional[str] = None,
|
|
@@ -4254,7 +4275,7 @@ class Methods(core.BaseBot):
|
|
|
4254
4275
|
async def answer_web_app_query(
|
|
4255
4276
|
self,
|
|
4256
4277
|
web_app_query_id: str,
|
|
4257
|
-
result:
|
|
4278
|
+
result: _InlineQueryResult,
|
|
4258
4279
|
) -> SentWebAppMessage:
|
|
4259
4280
|
'''
|
|
4260
4281
|
Use this method to set the result of
|
|
@@ -4275,7 +4296,7 @@ class Methods(core.BaseBot):
|
|
|
4275
4296
|
async def save_prepared_inline_message(
|
|
4276
4297
|
self,
|
|
4277
4298
|
user_id: int,
|
|
4278
|
-
result:
|
|
4299
|
+
result: _InlineQueryResult,
|
|
4279
4300
|
allow_user_chats: Optional[bool] = None,
|
|
4280
4301
|
allow_bot_chats: Optional[bool] = None,
|
|
4281
4302
|
allow_group_chats: Optional[bool] = None,
|
|
@@ -4560,7 +4581,7 @@ class Methods(core.BaseBot):
|
|
|
4560
4581
|
async def set_passport_data_errors(
|
|
4561
4582
|
self,
|
|
4562
4583
|
user_id: int,
|
|
4563
|
-
errors: List[
|
|
4584
|
+
errors: List[_PassportElementError],
|
|
4564
4585
|
) -> bool:
|
|
4565
4586
|
'''
|
|
4566
4587
|
Informs a user that some of the Telegram
|
|
@@ -9,8 +9,9 @@ import uuid
|
|
|
9
9
|
from typing import TYPE_CHECKING, Union, Optional, Literal, List, Any, overload
|
|
10
10
|
|
|
11
11
|
from pydantic import BaseModel, Field, TypeAdapter, model_serializer, SerializerFunctionWrapHandler, SerializationInfo
|
|
12
|
+
|
|
13
|
+
from . import enums
|
|
12
14
|
if TYPE_CHECKING:
|
|
13
|
-
from . import enums
|
|
14
15
|
from . import bot
|
|
15
16
|
from . import internals
|
|
16
17
|
|
|
@@ -36,7 +37,7 @@ class Message(MaybeInaccessibleMessage):
|
|
|
36
37
|
sender_boost_count: Optional[int] = Field(default=None)
|
|
37
38
|
sender_business_bot: Optional[User] = Field(default=None)
|
|
38
39
|
business_connection_id: Optional[str] = Field(default=None)
|
|
39
|
-
forward_origin: Optional[
|
|
40
|
+
forward_origin: Optional[_MessageOrigin] = Field(default=None)
|
|
40
41
|
is_topic_message: Optional[bool] = Field(default=None)
|
|
41
42
|
is_automatic_forward: Optional[bool] = Field(default=None)
|
|
42
43
|
reply_to_message: Optional[Message] = Field(default=None)
|
|
@@ -89,7 +90,7 @@ class Message(MaybeInaccessibleMessage):
|
|
|
89
90
|
message_auto_delete_timer_changed: Optional[MessageAutoDeleteTimerChanged] = Field(default=None)
|
|
90
91
|
migrate_to_chat_id: Optional[int] = Field(default=None)
|
|
91
92
|
migrate_from_chat_id: Optional[int] = Field(default=None)
|
|
92
|
-
pinned_message: Optional[
|
|
93
|
+
pinned_message: Optional[_MaybeInaccessibleMessage] = Field(default=None)
|
|
93
94
|
invoice: Optional[Invoice] = Field(default=None)
|
|
94
95
|
successful_payment: Optional[SuccessfulPayment] = Field(default=None)
|
|
95
96
|
refunded_payment: Optional[RefundedPayment] = Field(default=None)
|
|
@@ -575,7 +576,7 @@ class BackgroundTypeFill(BackgroundType):
|
|
|
575
576
|
'''
|
|
576
577
|
|
|
577
578
|
type: Literal['fill'] = 'fill' # pyright: ignore[reportIncompatibleVariableOverride]
|
|
578
|
-
fill:
|
|
579
|
+
fill: _BackgroundFill
|
|
579
580
|
dark_theme_dimming: int
|
|
580
581
|
|
|
581
582
|
class BackgroundTypeWallpaper(BackgroundType):
|
|
@@ -604,7 +605,7 @@ class BackgroundTypePattern(BackgroundType):
|
|
|
604
605
|
|
|
605
606
|
type: Literal['pattern'] = 'pattern' # pyright: ignore[reportIncompatibleVariableOverride]
|
|
606
607
|
document: Document
|
|
607
|
-
fill:
|
|
608
|
+
fill: _BackgroundFill
|
|
608
609
|
intensity: int
|
|
609
610
|
is_inverted: Optional[bool] = Field(default=None)
|
|
610
611
|
is_moving: Optional[bool] = Field(default=None)
|
|
@@ -775,7 +776,7 @@ class StoryAreaTypeSuggestedReaction(StoryAreaType):
|
|
|
775
776
|
'''
|
|
776
777
|
|
|
777
778
|
type: Literal['suggested_reaction'] = 'suggested_reaction' # pyright: ignore[reportIncompatibleVariableOverride]
|
|
778
|
-
reaction_type:
|
|
779
|
+
reaction_type: _ReactionType
|
|
779
780
|
is_dark: Optional[bool] = Field(default=None)
|
|
780
781
|
is_flipped: Optional[bool] = Field(default=None)
|
|
781
782
|
|
|
@@ -1334,7 +1335,7 @@ class InlineQueryResultCachedAudio(InlineQueryResult):
|
|
|
1334
1335
|
parse_mode: Optional[str] = Field(default=None)
|
|
1335
1336
|
caption_entities: Optional[List[MessageEntity]] = Field(default=None)
|
|
1336
1337
|
reply_markup: Optional[InlineKeyboardMarkup] = Field(default=None)
|
|
1337
|
-
input_message_content: Optional[
|
|
1338
|
+
input_message_content: Optional[_InputMessageContent] = Field(default=None)
|
|
1338
1339
|
|
|
1339
1340
|
class InlineQueryResultCachedDocument(InlineQueryResult):
|
|
1340
1341
|
'''
|
|
@@ -1357,7 +1358,7 @@ class InlineQueryResultCachedDocument(InlineQueryResult):
|
|
|
1357
1358
|
parse_mode: Optional[str] = Field(default=None)
|
|
1358
1359
|
caption_entities: Optional[List[MessageEntity]] = Field(default=None)
|
|
1359
1360
|
reply_markup: Optional[InlineKeyboardMarkup] = Field(default=None)
|
|
1360
|
-
input_message_content: Optional[
|
|
1361
|
+
input_message_content: Optional[_InputMessageContent] = Field(default=None)
|
|
1361
1362
|
|
|
1362
1363
|
class InlineQueryResultCachedGif(InlineQueryResult):
|
|
1363
1364
|
'''
|
|
@@ -1380,7 +1381,7 @@ class InlineQueryResultCachedGif(InlineQueryResult):
|
|
|
1380
1381
|
caption_entities: Optional[List[MessageEntity]] = Field(default=None)
|
|
1381
1382
|
show_caption_above_media: Optional[bool] = Field(default=None)
|
|
1382
1383
|
reply_markup: Optional[InlineKeyboardMarkup] = Field(default=None)
|
|
1383
|
-
input_message_content: Optional[
|
|
1384
|
+
input_message_content: Optional[_InputMessageContent] = Field(default=None)
|
|
1384
1385
|
|
|
1385
1386
|
class InlineQueryResultCachedMpeg4Gif(InlineQueryResult):
|
|
1386
1387
|
'''
|
|
@@ -1404,7 +1405,7 @@ class InlineQueryResultCachedMpeg4Gif(InlineQueryResult):
|
|
|
1404
1405
|
caption_entities: Optional[List[MessageEntity]] = Field(default=None)
|
|
1405
1406
|
show_caption_above_media: Optional[bool] = Field(default=None)
|
|
1406
1407
|
reply_markup: Optional[InlineKeyboardMarkup] = Field(default=None)
|
|
1407
|
-
input_message_content: Optional[
|
|
1408
|
+
input_message_content: Optional[_InputMessageContent] = Field(default=None)
|
|
1408
1409
|
|
|
1409
1410
|
class InlineQueryResultCachedPhoto(InlineQueryResult):
|
|
1410
1411
|
'''
|
|
@@ -1428,7 +1429,7 @@ class InlineQueryResultCachedPhoto(InlineQueryResult):
|
|
|
1428
1429
|
caption_entities: Optional[List[MessageEntity]] = Field(default=None)
|
|
1429
1430
|
show_caption_above_media: Optional[bool] = Field(default=None)
|
|
1430
1431
|
reply_markup: Optional[InlineKeyboardMarkup] = Field(default=None)
|
|
1431
|
-
input_message_content: Optional[
|
|
1432
|
+
input_message_content: Optional[_InputMessageContent] = Field(default=None)
|
|
1432
1433
|
|
|
1433
1434
|
class InlineQueryResultCachedSticker(InlineQueryResult):
|
|
1434
1435
|
'''
|
|
@@ -1445,7 +1446,7 @@ class InlineQueryResultCachedSticker(InlineQueryResult):
|
|
|
1445
1446
|
id: str
|
|
1446
1447
|
sticker_file_id: str
|
|
1447
1448
|
reply_markup: Optional[InlineKeyboardMarkup] = Field(default=None)
|
|
1448
|
-
input_message_content: Optional[
|
|
1449
|
+
input_message_content: Optional[_InputMessageContent] = Field(default=None)
|
|
1449
1450
|
|
|
1450
1451
|
class InlineQueryResultCachedVideo(InlineQueryResult):
|
|
1451
1452
|
'''
|
|
@@ -1469,7 +1470,7 @@ class InlineQueryResultCachedVideo(InlineQueryResult):
|
|
|
1469
1470
|
caption_entities: Optional[List[MessageEntity]] = Field(default=None)
|
|
1470
1471
|
show_caption_above_media: Optional[bool] = Field(default=None)
|
|
1471
1472
|
reply_markup: Optional[InlineKeyboardMarkup] = Field(default=None)
|
|
1472
|
-
input_message_content: Optional[
|
|
1473
|
+
input_message_content: Optional[_InputMessageContent] = Field(default=None)
|
|
1473
1474
|
|
|
1474
1475
|
class InlineQueryResultCachedVoice(InlineQueryResult):
|
|
1475
1476
|
'''
|
|
@@ -1491,7 +1492,7 @@ class InlineQueryResultCachedVoice(InlineQueryResult):
|
|
|
1491
1492
|
parse_mode: Optional[str] = Field(default=None)
|
|
1492
1493
|
caption_entities: Optional[List[MessageEntity]] = Field(default=None)
|
|
1493
1494
|
reply_markup: Optional[InlineKeyboardMarkup] = Field(default=None)
|
|
1494
|
-
input_message_content: Optional[
|
|
1495
|
+
input_message_content: Optional[_InputMessageContent] = Field(default=None)
|
|
1495
1496
|
|
|
1496
1497
|
class InlineQueryResultArticle(InlineQueryResult):
|
|
1497
1498
|
'''
|
|
@@ -1504,7 +1505,7 @@ class InlineQueryResultArticle(InlineQueryResult):
|
|
|
1504
1505
|
type: Literal['article'] = 'article' # pyright: ignore[reportIncompatibleVariableOverride]
|
|
1505
1506
|
id: str
|
|
1506
1507
|
title: str
|
|
1507
|
-
input_message_content:
|
|
1508
|
+
input_message_content: _InputMessageContent
|
|
1508
1509
|
reply_markup: Optional[InlineKeyboardMarkup] = Field(default=None)
|
|
1509
1510
|
url: Optional[str] = Field(default=None)
|
|
1510
1511
|
description: Optional[str] = Field(default=None)
|
|
@@ -1533,7 +1534,7 @@ class InlineQueryResultAudio(InlineQueryResult):
|
|
|
1533
1534
|
performer: Optional[str] = Field(default=None)
|
|
1534
1535
|
audio_duration: Optional[int] = Field(default=None)
|
|
1535
1536
|
reply_markup: Optional[InlineKeyboardMarkup] = Field(default=None)
|
|
1536
|
-
input_message_content: Optional[
|
|
1537
|
+
input_message_content: Optional[_InputMessageContent] = Field(default=None)
|
|
1537
1538
|
|
|
1538
1539
|
class InlineQueryResultContact(InlineQueryResult):
|
|
1539
1540
|
'''
|
|
@@ -1553,7 +1554,7 @@ class InlineQueryResultContact(InlineQueryResult):
|
|
|
1553
1554
|
last_name: Optional[str] = Field(default=None)
|
|
1554
1555
|
vcard: Optional[str] = Field(default=None)
|
|
1555
1556
|
reply_markup: Optional[InlineKeyboardMarkup] = Field(default=None)
|
|
1556
|
-
input_message_content: Optional[
|
|
1557
|
+
input_message_content: Optional[_InputMessageContent] = Field(default=None)
|
|
1557
1558
|
thumbnail_url: Optional[str] = Field(default=None)
|
|
1558
1559
|
thumbnail_width: Optional[int] = Field(default=None)
|
|
1559
1560
|
thumbnail_height: Optional[int] = Field(default=None)
|
|
@@ -1593,7 +1594,7 @@ class InlineQueryResultDocument(InlineQueryResult):
|
|
|
1593
1594
|
caption_entities: Optional[List[MessageEntity]] = Field(default=None)
|
|
1594
1595
|
description: Optional[str] = Field(default=None)
|
|
1595
1596
|
reply_markup: Optional[InlineKeyboardMarkup] = Field(default=None)
|
|
1596
|
-
input_message_content: Optional[
|
|
1597
|
+
input_message_content: Optional[_InputMessageContent] = Field(default=None)
|
|
1597
1598
|
thumbnail_url: Optional[str] = Field(default=None)
|
|
1598
1599
|
thumbnail_width: Optional[int] = Field(default=None)
|
|
1599
1600
|
thumbnail_height: Optional[int] = Field(default=None)
|
|
@@ -1623,7 +1624,7 @@ class InlineQueryResultGif(InlineQueryResult):
|
|
|
1623
1624
|
caption_entities: Optional[List[MessageEntity]] = Field(default=None)
|
|
1624
1625
|
show_caption_above_media: Optional[bool] = Field(default=None)
|
|
1625
1626
|
reply_markup: Optional[InlineKeyboardMarkup] = Field(default=None)
|
|
1626
|
-
input_message_content: Optional[
|
|
1627
|
+
input_message_content: Optional[_InputMessageContent] = Field(default=None)
|
|
1627
1628
|
|
|
1628
1629
|
class InlineQueryResultLocation(InlineQueryResult):
|
|
1629
1630
|
'''
|
|
@@ -1646,7 +1647,7 @@ class InlineQueryResultLocation(InlineQueryResult):
|
|
|
1646
1647
|
heading: Optional[int] = Field(default=None)
|
|
1647
1648
|
proximity_alert_radius: Optional[int] = Field(default=None)
|
|
1648
1649
|
reply_markup: Optional[InlineKeyboardMarkup] = Field(default=None)
|
|
1649
|
-
input_message_content: Optional[
|
|
1650
|
+
input_message_content: Optional[_InputMessageContent] = Field(default=None)
|
|
1650
1651
|
thumbnail_url: Optional[str] = Field(default=None)
|
|
1651
1652
|
thumbnail_width: Optional[int] = Field(default=None)
|
|
1652
1653
|
thumbnail_height: Optional[int] = Field(default=None)
|
|
@@ -1677,7 +1678,7 @@ class InlineQueryResultMpeg4Gif(InlineQueryResult):
|
|
|
1677
1678
|
caption_entities: Optional[List[MessageEntity]] = Field(default=None)
|
|
1678
1679
|
show_caption_above_media: Optional[bool] = Field(default=None)
|
|
1679
1680
|
reply_markup: Optional[InlineKeyboardMarkup] = Field(default=None)
|
|
1680
|
-
input_message_content: Optional[
|
|
1681
|
+
input_message_content: Optional[_InputMessageContent] = Field(default=None)
|
|
1681
1682
|
|
|
1682
1683
|
class InlineQueryResultPhoto(InlineQueryResult):
|
|
1683
1684
|
'''
|
|
@@ -1703,7 +1704,7 @@ class InlineQueryResultPhoto(InlineQueryResult):
|
|
|
1703
1704
|
caption_entities: Optional[List[MessageEntity]] = Field(default=None)
|
|
1704
1705
|
show_caption_above_media: Optional[bool] = Field(default=None)
|
|
1705
1706
|
reply_markup: Optional[InlineKeyboardMarkup] = Field(default=None)
|
|
1706
|
-
input_message_content: Optional[
|
|
1707
|
+
input_message_content: Optional[_InputMessageContent] = Field(default=None)
|
|
1707
1708
|
|
|
1708
1709
|
class InlineQueryResultVenue(InlineQueryResult):
|
|
1709
1710
|
'''
|
|
@@ -1726,7 +1727,7 @@ class InlineQueryResultVenue(InlineQueryResult):
|
|
|
1726
1727
|
google_place_id: Optional[str] = Field(default=None)
|
|
1727
1728
|
google_place_type: Optional[str] = Field(default=None)
|
|
1728
1729
|
reply_markup: Optional[InlineKeyboardMarkup] = Field(default=None)
|
|
1729
|
-
input_message_content: Optional[
|
|
1730
|
+
input_message_content: Optional[_InputMessageContent] = Field(default=None)
|
|
1730
1731
|
thumbnail_url: Optional[str] = Field(default=None)
|
|
1731
1732
|
thumbnail_width: Optional[int] = Field(default=None)
|
|
1732
1733
|
thumbnail_height: Optional[int] = Field(default=None)
|
|
@@ -1758,7 +1759,7 @@ class InlineQueryResultVideo(InlineQueryResult):
|
|
|
1758
1759
|
video_duration: Optional[int] = Field(default=None)
|
|
1759
1760
|
description: Optional[str] = Field(default=None)
|
|
1760
1761
|
reply_markup: Optional[InlineKeyboardMarkup] = Field(default=None)
|
|
1761
|
-
input_message_content: Optional[
|
|
1762
|
+
input_message_content: Optional[_InputMessageContent] = Field(default=None)
|
|
1762
1763
|
|
|
1763
1764
|
class InlineQueryResultVoice(InlineQueryResult):
|
|
1764
1765
|
'''
|
|
@@ -1781,7 +1782,7 @@ class InlineQueryResultVoice(InlineQueryResult):
|
|
|
1781
1782
|
caption_entities: Optional[List[MessageEntity]] = Field(default=None)
|
|
1782
1783
|
voice_duration: Optional[int] = Field(default=None)
|
|
1783
1784
|
reply_markup: Optional[InlineKeyboardMarkup] = Field(default=None)
|
|
1784
|
-
input_message_content: Optional[
|
|
1785
|
+
input_message_content: Optional[_InputMessageContent] = Field(default=None)
|
|
1785
1786
|
|
|
1786
1787
|
_InlineQueryResult = Union[
|
|
1787
1788
|
InlineQueryResultCachedAudio,
|
|
@@ -1966,7 +1967,7 @@ class TransactionPartnerUser(TransactionPartner):
|
|
|
1966
1967
|
affiliate: Optional[AffiliateInfo] = Field(default=None)
|
|
1967
1968
|
invoice_payload: Optional[str] = Field(default=None)
|
|
1968
1969
|
subscription_period: Optional[int] = Field(default=None)
|
|
1969
|
-
paid_media: Optional[List[
|
|
1970
|
+
paid_media: Optional[List[_PaidMedia]] = Field(default=None)
|
|
1970
1971
|
paid_media_payload: Optional[str] = Field(default=None)
|
|
1971
1972
|
gift: Optional[Gift] = Field(default=None)
|
|
1972
1973
|
premium_subscription_duration: Optional[int] = Field(default=None)
|
|
@@ -2002,7 +2003,7 @@ class TransactionPartnerFragment(TransactionPartner):
|
|
|
2002
2003
|
'''
|
|
2003
2004
|
|
|
2004
2005
|
type: Literal['fragment'] = 'fragment' # pyright: ignore[reportIncompatibleVariableOverride]
|
|
2005
|
-
withdrawal_state: Optional[
|
|
2006
|
+
withdrawal_state: Optional[_RevenueWithdrawalState] = Field(default=None)
|
|
2006
2007
|
|
|
2007
2008
|
class TransactionPartnerTelegramAds(TransactionPartner):
|
|
2008
2009
|
'''
|
|
@@ -2318,7 +2319,7 @@ class ChatFullInfo(BaseModel):
|
|
|
2318
2319
|
business_opening_hours: Optional[BusinessOpeningHours] = Field(default=None)
|
|
2319
2320
|
personal_chat: Optional[Chat] = Field(default=None)
|
|
2320
2321
|
parent_chat: Optional[Chat] = Field(default=None)
|
|
2321
|
-
available_reactions: Optional[List[
|
|
2322
|
+
available_reactions: Optional[List[_ReactionType]] = Field(default=None)
|
|
2322
2323
|
background_custom_emoji_id: Optional[str] = Field(default=None)
|
|
2323
2324
|
profile_accent_color_id: Optional[int] = Field(default=None)
|
|
2324
2325
|
profile_background_custom_emoji_id: Optional[str] = Field(default=None)
|
|
@@ -2417,7 +2418,7 @@ class ExternalReplyInfo(BaseModel):
|
|
|
2417
2418
|
Reference: https://core.telegram.org/bots/api#externalreplyinfo
|
|
2418
2419
|
'''
|
|
2419
2420
|
|
|
2420
|
-
origin:
|
|
2421
|
+
origin: _MessageOrigin
|
|
2421
2422
|
chat: Optional[Chat] = Field(default=None)
|
|
2422
2423
|
message_id: Optional[int] = Field(default=None)
|
|
2423
2424
|
link_preview_options: Optional[LinkPreviewOptions] = Field(default=None)
|
|
@@ -2590,7 +2591,7 @@ class PaidMediaInfo(BaseModel):
|
|
|
2590
2591
|
'''
|
|
2591
2592
|
|
|
2592
2593
|
star_count: int
|
|
2593
|
-
paid_media: List[
|
|
2594
|
+
paid_media: List[_PaidMedia]
|
|
2594
2595
|
|
|
2595
2596
|
class Contact(BaseModel):
|
|
2596
2597
|
'''
|
|
@@ -2831,7 +2832,7 @@ class ChatBackground(BaseModel):
|
|
|
2831
2832
|
Reference: https://core.telegram.org/bots/api#chatbackground
|
|
2832
2833
|
'''
|
|
2833
2834
|
|
|
2834
|
-
type:
|
|
2835
|
+
type: _BackgroundType
|
|
2835
2836
|
|
|
2836
2837
|
class ForumTopicCreated(BaseModel):
|
|
2837
2838
|
'''
|
|
@@ -3498,7 +3499,7 @@ class CallbackQuery(BaseModel):
|
|
|
3498
3499
|
id: str
|
|
3499
3500
|
from_user: User = Field(alias='from') # FIX `from` is a python reserved keyword
|
|
3500
3501
|
chat_instance: str
|
|
3501
|
-
message: Optional[
|
|
3502
|
+
message: Optional[_MaybeInaccessibleMessage] = Field(default=None)
|
|
3502
3503
|
inline_message_id: Optional[str] = Field(default=None)
|
|
3503
3504
|
data: Optional[str] = Field(default=None)
|
|
3504
3505
|
game_short_name: Optional[str] = Field(default=None)
|
|
@@ -3588,8 +3589,8 @@ class ChatMemberUpdated(BaseModel):
|
|
|
3588
3589
|
chat: Chat
|
|
3589
3590
|
from_user: User = Field(alias='from') # FIX `from` is a python reserved keyword
|
|
3590
3591
|
date: int
|
|
3591
|
-
old_chat_member:
|
|
3592
|
-
new_chat_member:
|
|
3592
|
+
old_chat_member: _ChatMember
|
|
3593
|
+
new_chat_member: _ChatMember
|
|
3593
3594
|
invite_link: Optional[ChatInviteLink] = Field(default=None)
|
|
3594
3595
|
via_join_request: Optional[bool] = Field(default=None)
|
|
3595
3596
|
via_chat_folder_invite_link: Optional[bool] = Field(default=None)
|
|
@@ -3759,7 +3760,7 @@ class StoryArea(BaseModel):
|
|
|
3759
3760
|
'''
|
|
3760
3761
|
|
|
3761
3762
|
position: StoryAreaPosition
|
|
3762
|
-
type:
|
|
3763
|
+
type: _StoryAreaType
|
|
3763
3764
|
|
|
3764
3765
|
class ChatLocation(BaseModel):
|
|
3765
3766
|
'''
|
|
@@ -3780,7 +3781,7 @@ class ReactionCount(BaseModel):
|
|
|
3780
3781
|
Reference: https://core.telegram.org/bots/api#reactioncount
|
|
3781
3782
|
'''
|
|
3782
3783
|
|
|
3783
|
-
type:
|
|
3784
|
+
type: _ReactionType
|
|
3784
3785
|
total_count: int
|
|
3785
3786
|
|
|
3786
3787
|
class MessageReactionUpdated(BaseModel):
|
|
@@ -3794,8 +3795,8 @@ class MessageReactionUpdated(BaseModel):
|
|
|
3794
3795
|
chat: Chat
|
|
3795
3796
|
message_id: int
|
|
3796
3797
|
date: int
|
|
3797
|
-
old_reaction: List[
|
|
3798
|
-
new_reaction: List[
|
|
3798
|
+
old_reaction: List[_ReactionType]
|
|
3799
|
+
new_reaction: List[_ReactionType]
|
|
3799
3800
|
user: Optional[User] = Field(default=None)
|
|
3800
3801
|
actor_chat: Optional[Chat] = Field(default=None)
|
|
3801
3802
|
|
|
@@ -3996,7 +3997,7 @@ class OwnedGifts(BaseModel):
|
|
|
3996
3997
|
'''
|
|
3997
3998
|
|
|
3998
3999
|
total_count: int
|
|
3999
|
-
gifts: List[
|
|
4000
|
+
gifts: List[_OwnedGift]
|
|
4000
4001
|
next_offset: Optional[str] = Field(default=None)
|
|
4001
4002
|
|
|
4002
4003
|
class AcceptedGiftTypes(BaseModel):
|
|
@@ -4071,7 +4072,7 @@ class ChatBoost(BaseModel):
|
|
|
4071
4072
|
boost_id: str
|
|
4072
4073
|
add_date: int
|
|
4073
4074
|
expiration_date: int
|
|
4074
|
-
source:
|
|
4075
|
+
source: _ChatBoostSource
|
|
4075
4076
|
|
|
4076
4077
|
class ChatBoostUpdated(BaseModel):
|
|
4077
4078
|
'''
|
|
@@ -4095,7 +4096,7 @@ class ChatBoostRemoved(BaseModel):
|
|
|
4095
4096
|
chat: Chat
|
|
4096
4097
|
boost_id: str
|
|
4097
4098
|
remove_date: int
|
|
4098
|
-
source:
|
|
4099
|
+
source: _ChatBoostSource
|
|
4099
4100
|
|
|
4100
4101
|
class UserChatBoosts(BaseModel):
|
|
4101
4102
|
'''
|
|
@@ -4499,8 +4500,8 @@ class StarTransaction(BaseModel):
|
|
|
4499
4500
|
amount: int
|
|
4500
4501
|
date: int
|
|
4501
4502
|
nanostar_amount: Optional[int] = Field(default=None)
|
|
4502
|
-
source: Optional[
|
|
4503
|
-
receiver: Optional[
|
|
4503
|
+
source: Optional[_TransactionPartner] = Field(default=None)
|
|
4504
|
+
receiver: Optional[_TransactionPartner] = Field(default=None)
|
|
4504
4505
|
|
|
4505
4506
|
class StarTransactions(BaseModel):
|
|
4506
4507
|
'''
|
|
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
|