telegrinder 0.1.dev12__py3-none-any.whl → 0.1.dev14__py3-none-any.whl
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.
Potentially problematic release.
This version of telegrinder might be problematic. Click here for more details.
- telegrinder/__init__.py +1 -0
- telegrinder/api/abc.py +4 -0
- telegrinder/bot/__init__.py +1 -1
- telegrinder/bot/cute_types/message.py +7 -1
- telegrinder/bot/dispatch/handler/func.py +2 -0
- telegrinder/bot/scenario/__init__.py +1 -0
- telegrinder/bot/scenario/checkbox.py +1 -3
- telegrinder/bot/scenario/choice.py +39 -0
- telegrinder/types/methods.py +88 -0
- telegrinder/types/objects.py +49 -0
- {telegrinder-0.1.dev12.dist-info → telegrinder-0.1.dev14.dist-info}/METADATA +1 -1
- {telegrinder-0.1.dev12.dist-info → telegrinder-0.1.dev14.dist-info}/RECORD +14 -13
- {telegrinder-0.1.dev12.dist-info → telegrinder-0.1.dev14.dist-info}/LICENSE +0 -0
- {telegrinder-0.1.dev12.dist-info → telegrinder-0.1.dev14.dist-info}/WHEEL +0 -0
telegrinder/__init__.py
CHANGED
telegrinder/api/abc.py
CHANGED
telegrinder/bot/__init__.py
CHANGED
|
@@ -12,4 +12,4 @@ from .dispatch import (
|
|
|
12
12
|
from .bot import Telegrinder
|
|
13
13
|
from .cute_types import MessageCute, CallbackQueryCute, InlineQueryCute
|
|
14
14
|
from .rules import ABCRule, ABCMessageRule
|
|
15
|
-
from .scenario import ABCScenario, Checkbox
|
|
15
|
+
from .scenario import ABCScenario, Checkbox, SingleChoice
|
|
@@ -40,6 +40,8 @@ class MessageCute(Message):
|
|
|
40
40
|
**other
|
|
41
41
|
) -> Result["Message", APIError]:
|
|
42
42
|
params = get_params(locals())
|
|
43
|
+
if "message_thread_id" not in params and self.is_topic_message:
|
|
44
|
+
params["message_thread_id"] = self.message_thread_id
|
|
43
45
|
return await self.ctx_api.send_message(chat_id=self.chat.id, **params)
|
|
44
46
|
|
|
45
47
|
async def reply(
|
|
@@ -62,6 +64,10 @@ class MessageCute(Message):
|
|
|
62
64
|
**other
|
|
63
65
|
) -> Result["Message", APIError]:
|
|
64
66
|
params = get_params(locals())
|
|
67
|
+
if "message_thread_id" not in params and self.is_topic_message:
|
|
68
|
+
params["message_thread_id"] = self.message_thread_id
|
|
65
69
|
return await self.ctx_api.send_message(
|
|
66
|
-
chat_id=self.chat.id,
|
|
70
|
+
chat_id=self.chat.id,
|
|
71
|
+
reply_to_message_id=self.message_id,
|
|
72
|
+
**params
|
|
67
73
|
)
|
|
@@ -5,6 +5,7 @@ from telegrinder.tools import magic_bundle
|
|
|
5
5
|
from telegrinder.types import Update
|
|
6
6
|
from telegrinder.api.abc import ABCAPI
|
|
7
7
|
from .abc import ABCHandler
|
|
8
|
+
from telegrinder.modules import logger
|
|
8
9
|
|
|
9
10
|
T = typing.TypeVar("T")
|
|
10
11
|
|
|
@@ -38,6 +39,7 @@ class FuncHandler(ABCHandler, typing.Generic[T]):
|
|
|
38
39
|
api=api,
|
|
39
40
|
)
|
|
40
41
|
if not await rule.run_check(e, self.ctx):
|
|
42
|
+
logger.debug("Rule {} failed", rule)
|
|
41
43
|
return False
|
|
42
44
|
return True
|
|
43
45
|
|
|
@@ -35,13 +35,11 @@ class Checkbox(ABCScenario):
|
|
|
35
35
|
self,
|
|
36
36
|
chat_id: int,
|
|
37
37
|
msg: str,
|
|
38
|
-
multiple_choice: bool = True,
|
|
39
38
|
ready_text: str = "Ready",
|
|
40
39
|
max_in_row: int = 3,
|
|
41
40
|
):
|
|
42
41
|
self.chat_id = chat_id
|
|
43
42
|
self.msg = msg
|
|
44
|
-
self.multiple_choice = multiple_choice
|
|
45
43
|
self.choices: typing.List[Choice] = []
|
|
46
44
|
self.ready = ready_text
|
|
47
45
|
self.max_in_row = max_in_row
|
|
@@ -100,7 +98,7 @@ class Checkbox(ABCScenario):
|
|
|
100
98
|
assert len(self.choices) > 1
|
|
101
99
|
message = (
|
|
102
100
|
await api.send_message(
|
|
103
|
-
self.chat_id, self.msg, self.PARSE_MODE, reply_markup=self.get_markup()
|
|
101
|
+
self.chat_id, text=self.msg, parse_mode=self.PARSE_MODE, reply_markup=self.get_markup()
|
|
104
102
|
)
|
|
105
103
|
).unwrap()
|
|
106
104
|
while True:
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
from .checkbox import Checkbox
|
|
2
|
+
from telegrinder.bot.cute_types import CallbackQueryCute
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
if typing.TYPE_CHECKING:
|
|
6
|
+
from telegrinder.api import API
|
|
7
|
+
from telegrinder.bot.dispatch import Dispatch
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class SingleChoice(Checkbox):
|
|
11
|
+
async def handle(self, cb: CallbackQueryCute) -> bool:
|
|
12
|
+
code = cb.data.replace(self.random_code + "/", "", 1)
|
|
13
|
+
|
|
14
|
+
if code == "ready":
|
|
15
|
+
return False
|
|
16
|
+
|
|
17
|
+
for choice in self.choices:
|
|
18
|
+
choice.is_picked = False
|
|
19
|
+
|
|
20
|
+
for i, choice in enumerate(self.choices):
|
|
21
|
+
if choice.code == code:
|
|
22
|
+
self.choices[i].is_picked = True
|
|
23
|
+
await cb.ctx_api.edit_message_text(
|
|
24
|
+
cb.message.chat.id,
|
|
25
|
+
cb.message.message_id,
|
|
26
|
+
text=self.msg,
|
|
27
|
+
parse_mode=self.PARSE_MODE,
|
|
28
|
+
reply_markup=self.get_markup(),
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
return True
|
|
32
|
+
|
|
33
|
+
async def wait(
|
|
34
|
+
self, api: "API", dispatch: "Dispatch"
|
|
35
|
+
) -> typing.Tuple[str, int]:
|
|
36
|
+
if len([choice for choice in self.choices if choice.is_picked]) != 1:
|
|
37
|
+
raise ValueError("Exactly one choice must be picked")
|
|
38
|
+
choices, m_id = await super().wait(api, dispatch)
|
|
39
|
+
return list(choices.keys())[list(choices.values()).index(True)], m_id
|
telegrinder/types/methods.py
CHANGED
|
@@ -63,6 +63,7 @@ class APIMethods:
|
|
|
63
63
|
async def send_message(
|
|
64
64
|
self,
|
|
65
65
|
chat_id: typing.Optional[typing.Union[int, str]] = None,
|
|
66
|
+
message_thread_id: typing.Optional[int] = None,
|
|
66
67
|
text: typing.Optional[str] = None,
|
|
67
68
|
parse_mode: typing.Optional[str] = None,
|
|
68
69
|
entities: typing.Optional[typing.List[MessageEntity]] = None,
|
|
@@ -87,6 +88,7 @@ class APIMethods:
|
|
|
87
88
|
async def forward_message(
|
|
88
89
|
self,
|
|
89
90
|
chat_id: typing.Optional[typing.Union[int, str]] = None,
|
|
91
|
+
message_thread_id: typing.Optional[int] = None,
|
|
90
92
|
from_chat_id: typing.Optional[typing.Union[int, str]] = None,
|
|
91
93
|
disable_notification: typing.Optional[bool] = None,
|
|
92
94
|
protect_content: typing.Optional[bool] = None,
|
|
@@ -99,6 +101,7 @@ class APIMethods:
|
|
|
99
101
|
async def copy_message(
|
|
100
102
|
self,
|
|
101
103
|
chat_id: typing.Optional[typing.Union[int, str]] = None,
|
|
104
|
+
message_thread_id: typing.Optional[int] = None,
|
|
102
105
|
from_chat_id: typing.Optional[typing.Union[int, str]] = None,
|
|
103
106
|
message_id: typing.Optional[int] = None,
|
|
104
107
|
caption: typing.Optional[str] = None,
|
|
@@ -124,6 +127,7 @@ class APIMethods:
|
|
|
124
127
|
async def send_photo(
|
|
125
128
|
self,
|
|
126
129
|
chat_id: typing.Optional[typing.Union[int, str]] = None,
|
|
130
|
+
message_thread_id: typing.Optional[int] = None,
|
|
127
131
|
photo: typing.Optional[typing.Union[InputFile, str]] = None,
|
|
128
132
|
caption: typing.Optional[str] = None,
|
|
129
133
|
parse_mode: typing.Optional[str] = None,
|
|
@@ -148,6 +152,7 @@ class APIMethods:
|
|
|
148
152
|
async def send_audio(
|
|
149
153
|
self,
|
|
150
154
|
chat_id: typing.Optional[typing.Union[int, str]] = None,
|
|
155
|
+
message_thread_id: typing.Optional[int] = None,
|
|
151
156
|
audio: typing.Optional[typing.Union[InputFile, str]] = None,
|
|
152
157
|
caption: typing.Optional[str] = None,
|
|
153
158
|
parse_mode: typing.Optional[str] = None,
|
|
@@ -176,6 +181,7 @@ class APIMethods:
|
|
|
176
181
|
async def send_document(
|
|
177
182
|
self,
|
|
178
183
|
chat_id: typing.Optional[typing.Union[int, str]] = None,
|
|
184
|
+
message_thread_id: typing.Optional[int] = None,
|
|
179
185
|
document: typing.Optional[typing.Union[InputFile, str]] = None,
|
|
180
186
|
thumb: typing.Optional[typing.Union[InputFile, str]] = None,
|
|
181
187
|
caption: typing.Optional[str] = None,
|
|
@@ -202,6 +208,7 @@ class APIMethods:
|
|
|
202
208
|
async def send_video(
|
|
203
209
|
self,
|
|
204
210
|
chat_id: typing.Optional[typing.Union[int, str]] = None,
|
|
211
|
+
message_thread_id: typing.Optional[int] = None,
|
|
205
212
|
video: typing.Optional[typing.Union[InputFile, str]] = None,
|
|
206
213
|
duration: typing.Optional[int] = None,
|
|
207
214
|
width: typing.Optional[int] = None,
|
|
@@ -231,6 +238,7 @@ class APIMethods:
|
|
|
231
238
|
async def send_animation(
|
|
232
239
|
self,
|
|
233
240
|
chat_id: typing.Optional[typing.Union[int, str]] = None,
|
|
241
|
+
message_thread_id: typing.Optional[int] = None,
|
|
234
242
|
animation: typing.Optional[typing.Union[InputFile, str]] = None,
|
|
235
243
|
duration: typing.Optional[int] = None,
|
|
236
244
|
width: typing.Optional[int] = None,
|
|
@@ -259,6 +267,7 @@ class APIMethods:
|
|
|
259
267
|
async def send_voice(
|
|
260
268
|
self,
|
|
261
269
|
chat_id: typing.Optional[typing.Union[int, str]] = None,
|
|
270
|
+
message_thread_id: typing.Optional[int] = None,
|
|
262
271
|
voice: typing.Optional[typing.Union[InputFile, str]] = None,
|
|
263
272
|
caption: typing.Optional[str] = None,
|
|
264
273
|
parse_mode: typing.Optional[str] = None,
|
|
@@ -284,6 +293,7 @@ class APIMethods:
|
|
|
284
293
|
async def send_video_note(
|
|
285
294
|
self,
|
|
286
295
|
chat_id: typing.Optional[typing.Union[int, str]] = None,
|
|
296
|
+
message_thread_id: typing.Optional[int] = None,
|
|
287
297
|
video_note: typing.Optional[typing.Union[InputFile, str]] = None,
|
|
288
298
|
duration: typing.Optional[int] = None,
|
|
289
299
|
length: typing.Optional[int] = None,
|
|
@@ -308,6 +318,7 @@ class APIMethods:
|
|
|
308
318
|
async def send_media_group(
|
|
309
319
|
self,
|
|
310
320
|
chat_id: typing.Optional[typing.Union[int, str]] = None,
|
|
321
|
+
message_thread_id: typing.Optional[int] = None,
|
|
311
322
|
media: typing.Optional[
|
|
312
323
|
typing.List[
|
|
313
324
|
typing.Union[
|
|
@@ -330,6 +341,7 @@ class APIMethods:
|
|
|
330
341
|
async def send_location(
|
|
331
342
|
self,
|
|
332
343
|
chat_id: typing.Optional[typing.Union[int, str]] = None,
|
|
344
|
+
message_thread_id: typing.Optional[int] = None,
|
|
333
345
|
latitude: typing.Optional[float] = None,
|
|
334
346
|
longitude: typing.Optional[float] = None,
|
|
335
347
|
horizontal_accuracy: typing.Optional[float] = None,
|
|
@@ -387,6 +399,7 @@ class APIMethods:
|
|
|
387
399
|
async def send_venue(
|
|
388
400
|
self,
|
|
389
401
|
chat_id: typing.Optional[typing.Union[int, str]] = None,
|
|
402
|
+
message_thread_id: typing.Optional[int] = None,
|
|
390
403
|
latitude: typing.Optional[float] = None,
|
|
391
404
|
longitude: typing.Optional[float] = None,
|
|
392
405
|
title: typing.Optional[str] = None,
|
|
@@ -415,6 +428,7 @@ class APIMethods:
|
|
|
415
428
|
async def send_contact(
|
|
416
429
|
self,
|
|
417
430
|
chat_id: typing.Optional[typing.Union[int, str]] = None,
|
|
431
|
+
message_thread_id: typing.Optional[int] = None,
|
|
418
432
|
phone_number: typing.Optional[str] = None,
|
|
419
433
|
first_name: typing.Optional[str] = None,
|
|
420
434
|
last_name: typing.Optional[str] = None,
|
|
@@ -439,6 +453,7 @@ class APIMethods:
|
|
|
439
453
|
async def send_poll(
|
|
440
454
|
self,
|
|
441
455
|
chat_id: typing.Optional[typing.Union[int, str]] = None,
|
|
456
|
+
message_thread_id: typing.Optional[int] = None,
|
|
442
457
|
question: typing.Optional[str] = None,
|
|
443
458
|
options: typing.Optional[typing.List[str]] = None,
|
|
444
459
|
is_anonymous: typing.Optional[bool] = None,
|
|
@@ -471,6 +486,7 @@ class APIMethods:
|
|
|
471
486
|
async def send_dice(
|
|
472
487
|
self,
|
|
473
488
|
chat_id: typing.Optional[typing.Union[int, str]] = None,
|
|
489
|
+
message_thread_id: typing.Optional[int] = None,
|
|
474
490
|
emoji: typing.Optional[str] = None,
|
|
475
491
|
disable_notification: typing.Optional[bool] = None,
|
|
476
492
|
protect_content: typing.Optional[bool] = None,
|
|
@@ -563,6 +579,7 @@ class APIMethods:
|
|
|
563
579
|
can_change_info: typing.Optional[bool] = None,
|
|
564
580
|
can_invite_users: typing.Optional[bool] = None,
|
|
565
581
|
can_pin_messages: typing.Optional[bool] = None,
|
|
582
|
+
can_manage_topics: typing.Optional[bool] = None,
|
|
566
583
|
**other
|
|
567
584
|
) -> Result[bool, APIError]:
|
|
568
585
|
result = await self.api.request_raw("promoteChatMember", get_params(locals()))
|
|
@@ -787,6 +804,74 @@ class APIMethods:
|
|
|
787
804
|
)
|
|
788
805
|
return full_result(result, bool)
|
|
789
806
|
|
|
807
|
+
async def get_forum_topic_icon_stickers(
|
|
808
|
+
self, **other
|
|
809
|
+
) -> Result[typing.List[Sticker], APIError]:
|
|
810
|
+
result = await self.api.request_raw(
|
|
811
|
+
"getForumTopicIconStickers", get_params(locals())
|
|
812
|
+
)
|
|
813
|
+
return full_result(result, typing.List[Sticker])
|
|
814
|
+
|
|
815
|
+
async def create_forum_topic(
|
|
816
|
+
self,
|
|
817
|
+
chat_id: typing.Optional[typing.Union[int, str]] = None,
|
|
818
|
+
name: typing.Optional[str] = None,
|
|
819
|
+
icon_color: typing.Optional[int] = None,
|
|
820
|
+
icon_custom_emoji_id: typing.Optional[str] = None,
|
|
821
|
+
**other
|
|
822
|
+
) -> Result[ForumTopic, APIError]:
|
|
823
|
+
result = await self.api.request_raw("createForumTopic", get_params(locals()))
|
|
824
|
+
return full_result(result, ForumTopic)
|
|
825
|
+
|
|
826
|
+
async def edit_forum_topic(
|
|
827
|
+
self,
|
|
828
|
+
chat_id: typing.Optional[typing.Union[int, str]] = None,
|
|
829
|
+
message_thread_id: typing.Optional[int] = None,
|
|
830
|
+
name: typing.Optional[str] = None,
|
|
831
|
+
icon_custom_emoji_id: typing.Optional[str] = None,
|
|
832
|
+
**other
|
|
833
|
+
) -> Result[bool, APIError]:
|
|
834
|
+
result = await self.api.request_raw("editForumTopic", get_params(locals()))
|
|
835
|
+
return full_result(result, bool)
|
|
836
|
+
|
|
837
|
+
async def close_forum_topic(
|
|
838
|
+
self,
|
|
839
|
+
chat_id: typing.Optional[typing.Union[int, str]] = None,
|
|
840
|
+
message_thread_id: typing.Optional[int] = None,
|
|
841
|
+
**other
|
|
842
|
+
) -> Result[bool, APIError]:
|
|
843
|
+
result = await self.api.request_raw("closeForumTopic", get_params(locals()))
|
|
844
|
+
return full_result(result, bool)
|
|
845
|
+
|
|
846
|
+
async def reopen_forum_topic(
|
|
847
|
+
self,
|
|
848
|
+
chat_id: typing.Optional[typing.Union[int, str]] = None,
|
|
849
|
+
message_thread_id: typing.Optional[int] = None,
|
|
850
|
+
**other
|
|
851
|
+
) -> Result[bool, APIError]:
|
|
852
|
+
result = await self.api.request_raw("reopenForumTopic", get_params(locals()))
|
|
853
|
+
return full_result(result, bool)
|
|
854
|
+
|
|
855
|
+
async def delete_forum_topic(
|
|
856
|
+
self,
|
|
857
|
+
chat_id: typing.Optional[typing.Union[int, str]] = None,
|
|
858
|
+
message_thread_id: typing.Optional[int] = None,
|
|
859
|
+
**other
|
|
860
|
+
) -> Result[bool, APIError]:
|
|
861
|
+
result = await self.api.request_raw("deleteForumTopic", get_params(locals()))
|
|
862
|
+
return full_result(result, bool)
|
|
863
|
+
|
|
864
|
+
async def unpin_all_forum_topic_messages(
|
|
865
|
+
self,
|
|
866
|
+
chat_id: typing.Optional[typing.Union[int, str]] = None,
|
|
867
|
+
message_thread_id: typing.Optional[int] = None,
|
|
868
|
+
**other
|
|
869
|
+
) -> Result[bool, APIError]:
|
|
870
|
+
result = await self.api.request_raw(
|
|
871
|
+
"unpinAllForumTopicMessages", get_params(locals())
|
|
872
|
+
)
|
|
873
|
+
return full_result(result, bool)
|
|
874
|
+
|
|
790
875
|
async def answer_callback_query(
|
|
791
876
|
self,
|
|
792
877
|
callback_query_id: typing.Optional[str] = None,
|
|
@@ -937,6 +1022,7 @@ class APIMethods:
|
|
|
937
1022
|
async def send_sticker(
|
|
938
1023
|
self,
|
|
939
1024
|
chat_id: typing.Optional[typing.Union[int, str]] = None,
|
|
1025
|
+
message_thread_id: typing.Optional[int] = None,
|
|
940
1026
|
sticker: typing.Optional[typing.Union[InputFile, str]] = None,
|
|
941
1027
|
disable_notification: typing.Optional[bool] = None,
|
|
942
1028
|
protect_content: typing.Optional[bool] = None,
|
|
@@ -1063,6 +1149,7 @@ class APIMethods:
|
|
|
1063
1149
|
async def send_invoice(
|
|
1064
1150
|
self,
|
|
1065
1151
|
chat_id: typing.Optional[typing.Union[int, str]] = None,
|
|
1152
|
+
message_thread_id: typing.Optional[int] = None,
|
|
1066
1153
|
title: typing.Optional[str] = None,
|
|
1067
1154
|
description: typing.Optional[str] = None,
|
|
1068
1155
|
payload: typing.Optional[str] = None,
|
|
@@ -1158,6 +1245,7 @@ class APIMethods:
|
|
|
1158
1245
|
async def send_game(
|
|
1159
1246
|
self,
|
|
1160
1247
|
chat_id: typing.Optional[int] = None,
|
|
1248
|
+
message_thread_id: typing.Optional[int] = None,
|
|
1161
1249
|
game_short_name: typing.Optional[str] = None,
|
|
1162
1250
|
disable_notification: typing.Optional[bool] = None,
|
|
1163
1251
|
protect_content: typing.Optional[bool] = None,
|
telegrinder/types/objects.py
CHANGED
|
@@ -75,7 +75,10 @@ class Chat(Model):
|
|
|
75
75
|
username: typing.Optional[str] = None
|
|
76
76
|
first_name: typing.Optional[str] = None
|
|
77
77
|
last_name: typing.Optional[str] = None
|
|
78
|
+
is_forum: typing.Optional[bool] = None
|
|
78
79
|
photo: typing.Optional["ChatPhoto"] = None
|
|
80
|
+
active_usernames: typing.Optional[typing.List[str]] = None
|
|
81
|
+
emoji_status_custom_emoji_id: typing.Optional[str] = None
|
|
79
82
|
bio: typing.Optional[str] = None
|
|
80
83
|
has_private_forwards: typing.Optional[bool] = None
|
|
81
84
|
has_restricted_voice_and_video_messages: typing.Optional[bool] = None
|
|
@@ -99,6 +102,7 @@ class Message(Model):
|
|
|
99
102
|
Docs: https://core.telegram.org/bots/api/#message"""
|
|
100
103
|
|
|
101
104
|
message_id: int
|
|
105
|
+
message_thread_id: typing.Optional[int] = None
|
|
102
106
|
from_: typing.Optional["User"] = None
|
|
103
107
|
sender_chat: typing.Optional["Chat"] = None
|
|
104
108
|
date: int
|
|
@@ -109,6 +113,7 @@ class Message(Model):
|
|
|
109
113
|
forward_signature: typing.Optional[str] = None
|
|
110
114
|
forward_sender_name: typing.Optional[str] = None
|
|
111
115
|
forward_date: typing.Optional[int] = None
|
|
116
|
+
is_topic_message: typing.Optional[bool] = None
|
|
112
117
|
is_automatic_forward: typing.Optional[bool] = None
|
|
113
118
|
reply_to_message: typing.Optional["Message"] = None
|
|
114
119
|
via_bot: typing.Optional["User"] = None
|
|
@@ -153,6 +158,9 @@ class Message(Model):
|
|
|
153
158
|
connected_website: typing.Optional[str] = None
|
|
154
159
|
passport_data: typing.Optional["PassportData"] = None
|
|
155
160
|
proximity_alert_triggered: typing.Optional["ProximityAlertTriggered"] = None
|
|
161
|
+
forum_topic_created: typing.Optional["ForumTopicCreated"] = None
|
|
162
|
+
forum_topic_closed: typing.Optional["ForumTopicClosed"] = None
|
|
163
|
+
forum_topic_reopened: typing.Optional["ForumTopicReopened"] = None
|
|
156
164
|
video_chat_scheduled: typing.Optional["VideoChatScheduled"] = None
|
|
157
165
|
video_chat_started: typing.Optional["VideoChatStarted"] = None
|
|
158
166
|
video_chat_ended: typing.Optional["VideoChatEnded"] = None
|
|
@@ -398,6 +406,32 @@ class MessageAutoDeleteTimerChanged(Model):
|
|
|
398
406
|
message_auto_delete_time: int
|
|
399
407
|
|
|
400
408
|
|
|
409
|
+
class ForumTopicCreated(Model):
|
|
410
|
+
"""This object represents a service message about a new forum topic created
|
|
411
|
+
in the chat.
|
|
412
|
+
Docs: https://core.telegram.org/bots/api/#forumtopiccreated"""
|
|
413
|
+
|
|
414
|
+
name: str
|
|
415
|
+
icon_color: int
|
|
416
|
+
icon_custom_emoji_id: typing.Optional[str] = None
|
|
417
|
+
|
|
418
|
+
|
|
419
|
+
class ForumTopicClosed(Model):
|
|
420
|
+
"""This object represents a service message about a forum topic closed in the
|
|
421
|
+
chat. Currently holds no information.
|
|
422
|
+
Docs: https://core.telegram.org/bots/api/#forumtopicclosed"""
|
|
423
|
+
|
|
424
|
+
pass
|
|
425
|
+
|
|
426
|
+
|
|
427
|
+
class ForumTopicReopened(Model):
|
|
428
|
+
"""This object represents a service message about a forum topic reopened in
|
|
429
|
+
the chat. Currently holds no information.
|
|
430
|
+
Docs: https://core.telegram.org/bots/api/#forumtopicreopened"""
|
|
431
|
+
|
|
432
|
+
pass
|
|
433
|
+
|
|
434
|
+
|
|
401
435
|
class VideoChatScheduled(Model):
|
|
402
436
|
"""This object represents a service message about a video chat scheduled in
|
|
403
437
|
the chat.
|
|
@@ -625,6 +659,7 @@ class ChatAdministratorRights(Model):
|
|
|
625
659
|
can_post_messages: typing.Optional[bool] = None
|
|
626
660
|
can_edit_messages: typing.Optional[bool] = None
|
|
627
661
|
can_pin_messages: typing.Optional[bool] = None
|
|
662
|
+
can_manage_topics: typing.Optional[bool] = None
|
|
628
663
|
|
|
629
664
|
|
|
630
665
|
class ChatMember(Model):
|
|
@@ -660,6 +695,7 @@ class ChatMember(Model):
|
|
|
660
695
|
can_post_messages: typing.Optional[bool] = None
|
|
661
696
|
can_edit_messages: typing.Optional[bool] = None
|
|
662
697
|
can_pin_messages: typing.Optional[bool] = None
|
|
698
|
+
can_manage_topics: typing.Optional[bool] = None
|
|
663
699
|
is_member: typing.Optional[bool] = None
|
|
664
700
|
can_send_messages: typing.Optional[bool] = None
|
|
665
701
|
can_send_media_messages: typing.Optional[bool] = None
|
|
@@ -699,6 +735,7 @@ class ChatMemberAdministrator(Model):
|
|
|
699
735
|
can_post_messages: typing.Optional[bool] = None
|
|
700
736
|
can_edit_messages: typing.Optional[bool] = None
|
|
701
737
|
can_pin_messages: typing.Optional[bool] = None
|
|
738
|
+
can_manage_topics: typing.Optional[bool] = None
|
|
702
739
|
custom_title: typing.Optional[str] = None
|
|
703
740
|
|
|
704
741
|
|
|
@@ -722,6 +759,7 @@ class ChatMemberRestricted(Model):
|
|
|
722
759
|
can_change_info: bool
|
|
723
760
|
can_invite_users: bool
|
|
724
761
|
can_pin_messages: bool
|
|
762
|
+
can_manage_topics: bool
|
|
725
763
|
can_send_messages: bool
|
|
726
764
|
can_send_media_messages: bool
|
|
727
765
|
can_send_polls: bool
|
|
@@ -786,6 +824,7 @@ class ChatPermissions(Model):
|
|
|
786
824
|
can_change_info: typing.Optional[bool] = None
|
|
787
825
|
can_invite_users: typing.Optional[bool] = None
|
|
788
826
|
can_pin_messages: typing.Optional[bool] = None
|
|
827
|
+
can_manage_topics: typing.Optional[bool] = None
|
|
789
828
|
|
|
790
829
|
|
|
791
830
|
class ChatLocation(Model):
|
|
@@ -796,6 +835,16 @@ class ChatLocation(Model):
|
|
|
796
835
|
address: str
|
|
797
836
|
|
|
798
837
|
|
|
838
|
+
class ForumTopic(Model):
|
|
839
|
+
"""This object represents a forum topic.
|
|
840
|
+
Docs: https://core.telegram.org/bots/api/#forumtopic"""
|
|
841
|
+
|
|
842
|
+
message_thread_id: int
|
|
843
|
+
name: str
|
|
844
|
+
icon_color: int
|
|
845
|
+
icon_custom_emoji_id: typing.Optional[str] = None
|
|
846
|
+
|
|
847
|
+
|
|
799
848
|
class BotCommand(Model):
|
|
800
849
|
"""This object represents a bot command.
|
|
801
850
|
Docs: https://core.telegram.org/bots/api/#botcommand"""
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
telegrinder/__init__.py,sha256=
|
|
1
|
+
telegrinder/__init__.py,sha256=rb93CGVNscnwhhiWAkFbK7FtJ5JYLGprOkI0FiJo_70,740
|
|
2
2
|
telegrinder/api/__init__.py,sha256=3ud8t2bfULV25IILu3CYYxr2_caa5B7We_l2tft_IOM,124
|
|
3
|
-
telegrinder/api/abc.py,sha256=
|
|
3
|
+
telegrinder/api/abc.py,sha256=oxNx2PSlL6hkPuXet_rw_TJGOrbdS57h4Rq7DN_L5NM,1085
|
|
4
4
|
telegrinder/api/api.py,sha256=LvR3_1zKKDQEClbmHUww3Jx1_Yar0qjmf6gU1r5WsXQ,1993
|
|
5
5
|
telegrinder/api/error.py,sha256=Aca9HkvHI7hitHCd9_FObzeF5iGxLkGGYtfIoIpOQaY,162
|
|
6
6
|
telegrinder/api/response.py,sha256=sna3gCo9T9ck5rugN7ptTFUwimrDAejb42DvbL9NNTA,463
|
|
7
|
-
telegrinder/bot/__init__.py,sha256=
|
|
7
|
+
telegrinder/bot/__init__.py,sha256=BK31L1pLKg6p3T8G0ZkOtCUEeYELpOfEKLVHIS6bHLk,405
|
|
8
8
|
telegrinder/bot/bot.py,sha256=lY7dXHLOgY3Z2Mi4RKD94RW0DpbLorilmUfYJYtDhFU,1802
|
|
9
9
|
telegrinder/bot/cute_types/__init__.py,sha256=s0otW5gfNLBYKFgvInymzdu-BE_RwZO77vpEMXx1ICA,121
|
|
10
10
|
telegrinder/bot/cute_types/callback_query.py,sha256=MiLutMHNgoTAF11orr1N6b2g95NmvlaUnRfc_4ORviQ,766
|
|
11
11
|
telegrinder/bot/cute_types/inline_query.py,sha256=0jmCKIJM3Jerc65R81Fnm4VzFCyJk6v81VOZNSgvaw0,1034
|
|
12
|
-
telegrinder/bot/cute_types/message.py,sha256=
|
|
12
|
+
telegrinder/bot/cute_types/message.py,sha256=0_cv0WEK5b99Q45rId0nwQHEtMZ7dmWVa5T5al4RQNE,2545
|
|
13
13
|
telegrinder/bot/dispatch/__init__.py,sha256=59KKzW9JFMVD03IeLCRgILHNPzDd0hv8sKxu-9qvrBA,240
|
|
14
14
|
telegrinder/bot/dispatch/abc.py,sha256=A2pXBQhbR3SlKqI-efAgKT_9kZdKXbFRuFX3xKC6-tA,448
|
|
15
15
|
telegrinder/bot/dispatch/dispatch.py,sha256=MPpKW0QcK-16PKf67hm6f7W1XdQcPUJEZ23V-OaxeOY,2931
|
|
16
16
|
telegrinder/bot/dispatch/handler/__init__.py,sha256=CNqgXHxt4Lqkp-gKtehNQ83zamsjPozi_Q8p51OcQ_k,58
|
|
17
17
|
telegrinder/bot/dispatch/handler/abc.py,sha256=cgzahm7YBZQ5HWdxDioF_iQoY4JFnWmxUppjNW7CXN0,411
|
|
18
|
-
telegrinder/bot/dispatch/handler/func.py,sha256=
|
|
18
|
+
telegrinder/bot/dispatch/handler/func.py,sha256=GA-L-UiDX1C_isF_5Wjw96XJU4rZ0UIc_YivVsn3uz0,1574
|
|
19
19
|
telegrinder/bot/dispatch/middleware/__init__.py,sha256=X1zpKTP3llOu8xgZ8uWRIJOFJtEPFpKnE1V8lsPuWWE,31
|
|
20
20
|
telegrinder/bot/dispatch/middleware/abc.py,sha256=UYvk2xPNde6FQUYY1MWh4EmNZNskUAkHZrg1qMf7W_w,268
|
|
21
21
|
telegrinder/bot/dispatch/process.py,sha256=FJUs7rmjtuzgTYe7iocKwG8IBd8RX60lhal8j2KnOTs,2000
|
|
@@ -38,9 +38,10 @@ telegrinder/bot/rules/is_from.py,sha256=heXO21MlI1IM0uxggX8sCIA_zjUYOf2qVqHpXjFI
|
|
|
38
38
|
telegrinder/bot/rules/markup.py,sha256=Hz1HZ_0LsKLjjpBJR-wocjE2dJmzbiVGTKf8d5-9OCg,1017
|
|
39
39
|
telegrinder/bot/rules/regex.py,sha256=jJOqIcpk5MqXLymQdAB_C6SAy4j37xK0N5HamZ9uh2k,877
|
|
40
40
|
telegrinder/bot/rules/text.py,sha256=feum_D04hxO2yqG0Wg5hBREj5B_2d1g0WM-OADNCJk4,759
|
|
41
|
-
telegrinder/bot/scenario/__init__.py,sha256=
|
|
41
|
+
telegrinder/bot/scenario/__init__.py,sha256=tOl23Yss8cpzkbZfqJqJ6YGuh5PqL70hk8ZiY1MH0AY,93
|
|
42
42
|
telegrinder/bot/scenario/abc.py,sha256=ad3VxvclZyEVuKKtunHKtxj9UiwNAmkyiC1JjOOUvS4,289
|
|
43
|
-
telegrinder/bot/scenario/checkbox.py,sha256=
|
|
43
|
+
telegrinder/bot/scenario/checkbox.py,sha256=m5EUMMOiuVL0l_CwSCRATfsPaH0BZiN8OEBbtX34nuQ,3586
|
|
44
|
+
telegrinder/bot/scenario/choice.py,sha256=C5oK6R37pUGz2sZiyNcErdBnjJpRo3RUA7yowSFSr-k,1321
|
|
44
45
|
telegrinder/client/__init__.py,sha256=YEx_WQAl9r07CE74xNyTUDOE2Da7K_A46jvC9U2zpyc,74
|
|
45
46
|
telegrinder/client/abc.py,sha256=tPgTp2Gcs9mgd6cSeKZegMnUEIgg0puS7nt7cdrseIM,1305
|
|
46
47
|
telegrinder/client/aiohttp.py,sha256=OZgGEPkwOeKveyTtQ8BxaEAZmXhS9XUodfswSFupgyk,3556
|
|
@@ -65,9 +66,9 @@ telegrinder/typegen/__main__.py,sha256=d6uusZavfkzf7RUbb5QLTzYuyRHayYdQnqj0ooBGh
|
|
|
65
66
|
telegrinder/typegen/nicification.py,sha256=ifp0mdGYWSPeesfrgPFRpv1rqOx3KnjjSeWk-Zr54_0,767
|
|
66
67
|
telegrinder/typegen/schema_generator.py,sha256=H29yB5aiFSkwhf50w9ZycIfJNEKKrbZjDb07JULlxuY,7930
|
|
67
68
|
telegrinder/types/__init__.py,sha256=RvjDKdmzKFNGZycud8Pn2y3VBtbWy2ZqZVDOJKYWsi8,40
|
|
68
|
-
telegrinder/types/methods.py,sha256=
|
|
69
|
-
telegrinder/types/objects.py,sha256=
|
|
70
|
-
telegrinder-0.1.
|
|
71
|
-
telegrinder-0.1.
|
|
72
|
-
telegrinder-0.1.
|
|
73
|
-
telegrinder-0.1.
|
|
69
|
+
telegrinder/types/methods.py,sha256=zjsf6K0HQMengti907i8DlJY8Y2y4LJ8WW7_bNbanCQ,53104
|
|
70
|
+
telegrinder/types/objects.py,sha256=yPQnMQYIRdXmFpBi_IJYlxjz9hZy3OF1-VGnRWvLcDE,77410
|
|
71
|
+
telegrinder-0.1.dev14.dist-info/LICENSE,sha256=ZJrZvGo1MQqQN2M-pPrYlpSmquLFja0i6-liRLlbKGo,1063
|
|
72
|
+
telegrinder-0.1.dev14.dist-info/WHEEL,sha256=bbU3AyvhQ312rVm7zzRQjs6axI1UYWC3nmFA2E6FFSI,88
|
|
73
|
+
telegrinder-0.1.dev14.dist-info/METADATA,sha256=5tSlPNQSeMSUViCyQoLbuXKGizOfDokLEf5ZarHOpp0,767
|
|
74
|
+
telegrinder-0.1.dev14.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|