telekit 2.6.0a4__tar.gz → 2.6.0a5__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.
- {telekit-2.6.0a4 → telekit-2.6.0a5}/PKG-INFO +3 -3
- {telekit-2.6.0a4 → telekit-2.6.0a5}/README.md +1 -1
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/_chain.py +3 -1
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/_version.py +1 -1
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/senders.py +7 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit.egg-info/PKG-INFO +3 -3
- {telekit-2.6.0a4 → telekit-2.6.0a5}/LICENSE +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/setup.cfg +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/setup.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/__init__.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/_buildtext/__init__.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/_buildtext/formatter.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/_buildtext/styles.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/_callback_query_handler.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/_chain_base.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/_chain_entry_logic.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/_chain_inline_keyboards_logic.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/_chapters/__init__.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/_chapters/chapters.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/_handler.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/_init.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/_inline_buttons.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/_inline_keyboard.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/_input_handler.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/_logger.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/_on.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/_reply_keyboard.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/_rich.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/_snapvault/__init__.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/_snapvault/snapcode.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/_snapvault/snapvault.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/_state.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/_telekit_dsl/__init__.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/_telekit_dsl/mixin.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/_telekit_dsl/parser/__init__.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/_telekit_dsl/parser/builder.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/_telekit_dsl/parser/canvas_parser.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/_telekit_dsl/parser/lexer.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/_telekit_dsl/parser/nodes.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/_telekit_dsl/parser/parser.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/_telekit_dsl/parser/token.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/_telekit_dsl/telekit_dsl.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/_telekit_dsl/telekit_orm.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/_text_builder.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/_timeout.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/_trait.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/_user.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/chat.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/debug.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/dices.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/example/__init__.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/example/example_handlers/__init__.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/example/example_handlers/article.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/example/example_handlers/calendar.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/example/example_handlers/complete_hotel.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/example/example_handlers/counter.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/example/example_handlers/dsl.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/example/example_handlers/entry.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/example/example_handlers/faq.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/example/example_handlers/hotel.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/example/example_handlers/on_text.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/example/example_handlers/pages.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/example/example_handlers/pyapi.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/example/example_handlers/qr.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/example/example_handlers/quiz.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/example/example_handlers/rich.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/example/example_handlers/spells.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/example/example_handlers/start.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/example/example_handlers/style.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/example/example_handlers/text_document.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/example/example_server.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/html_text.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/inline_buttons.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/parameters.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/reply_buttons.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/scheduler.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/server.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/styles.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/traits/__init__.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/traits/calendar_pick.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/traits/paginated_choice.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/traits/paginated_text.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/traits/track_handoff_origin.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/types.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit/utils.py +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit.egg-info/SOURCES.txt +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit.egg-info/dependency_links.txt +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit.egg-info/requires.txt +0 -0
- {telekit-2.6.0a4 → telekit-2.6.0a5}/telekit.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: telekit
|
|
3
|
-
Version: 2.6.
|
|
3
|
+
Version: 2.6.0a5
|
|
4
4
|
Summary: Declarative, developer-friendly framework for building Telegram bots
|
|
5
5
|
Home-page: https://github.com/Romashkaa/telekit
|
|
6
6
|
Author: romashka
|
|
@@ -42,7 +42,7 @@ Dynamic: summary
|
|
|
42
42
|
|
|
43
43
|
# Telekit
|
|
44
44
|
|
|
45
|
-
**Telekit** is a declarative, developer-friendly
|
|
45
|
+
**Telekit** is a declarative, developer-friendly framework for building Telegram bots. It gives developers a dedicated Sender for composing and sending messages and a Chain for handling dialogue between the user and the bot. The framework also handles inline keyboards and callback routing automatically, letting you focus on the bot's behavior instead of repetitive tasks.
|
|
46
46
|
|
|
47
47
|
```py
|
|
48
48
|
import telekit
|
|
@@ -471,7 +471,7 @@ Telekit focuses on one job: making Telegram bot development easier.
|
|
|
471
471
|
|
|
472
472
|
---
|
|
473
473
|
|
|
474
|
-
# Changes in version 2.6.
|
|
474
|
+
# Changes in version 2.6.0a5
|
|
475
475
|
|
|
476
476
|
### v2.6.0 `a4`
|
|
477
477
|
- Added `handle_handoff()` to `Handler`: a shortcut for `handoff(handler).handle()` that takes the target handler as an argument, so it can be passed to `add_callback()` without an extra closure
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Telekit
|
|
8
8
|
|
|
9
|
-
**Telekit** is a declarative, developer-friendly
|
|
9
|
+
**Telekit** is a declarative, developer-friendly framework for building Telegram bots. It gives developers a dedicated Sender for composing and sending messages and a Chain for handling dialogue between the user and the bot. The framework also handles inline keyboards and callback routing automatically, letting you focus on the bot's behavior instead of repetitive tasks.
|
|
10
10
|
|
|
11
11
|
```py
|
|
12
12
|
import telekit
|
|
@@ -153,7 +153,9 @@ class Chain(ChainInlineKeyboardLogic, ChainEntryLogic):
|
|
|
153
153
|
|
|
154
154
|
# reset edit target and store new previous message
|
|
155
155
|
self.sender.set_edit_message(None)
|
|
156
|
-
|
|
156
|
+
|
|
157
|
+
if message is not None:
|
|
158
|
+
self._previous_message = message
|
|
157
159
|
|
|
158
160
|
if Debug.timeout_warnings and _handler and not _timeout:
|
|
159
161
|
_library.warning(
|
|
@@ -945,6 +945,13 @@ class BaseSender:
|
|
|
945
945
|
# silently delete and resend
|
|
946
946
|
self._delete_message(self.edit_message_id)
|
|
947
947
|
except Exception as exception:
|
|
948
|
+
if "message content and reply markup are exactly the same" in str(exception):
|
|
949
|
+
library.warning(
|
|
950
|
+
f"Failed to edit message {self.edit_message_id}, "
|
|
951
|
+
f"do nothing instead. Exception: {exception}"
|
|
952
|
+
)
|
|
953
|
+
return None, False
|
|
954
|
+
|
|
948
955
|
_SILENT_EDIT_ERRORS = (
|
|
949
956
|
"Bad Request: there is no text in the message to edit",
|
|
950
957
|
"Bad Request: message can't be edited",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: telekit
|
|
3
|
-
Version: 2.6.
|
|
3
|
+
Version: 2.6.0a5
|
|
4
4
|
Summary: Declarative, developer-friendly framework for building Telegram bots
|
|
5
5
|
Home-page: https://github.com/Romashkaa/telekit
|
|
6
6
|
Author: romashka
|
|
@@ -42,7 +42,7 @@ Dynamic: summary
|
|
|
42
42
|
|
|
43
43
|
# Telekit
|
|
44
44
|
|
|
45
|
-
**Telekit** is a declarative, developer-friendly
|
|
45
|
+
**Telekit** is a declarative, developer-friendly framework for building Telegram bots. It gives developers a dedicated Sender for composing and sending messages and a Chain for handling dialogue between the user and the bot. The framework also handles inline keyboards and callback routing automatically, letting you focus on the bot's behavior instead of repetitive tasks.
|
|
46
46
|
|
|
47
47
|
```py
|
|
48
48
|
import telekit
|
|
@@ -471,7 +471,7 @@ Telekit focuses on one job: making Telegram bot development easier.
|
|
|
471
471
|
|
|
472
472
|
---
|
|
473
473
|
|
|
474
|
-
# Changes in version 2.6.
|
|
474
|
+
# Changes in version 2.6.0a5
|
|
475
475
|
|
|
476
476
|
### v2.6.0 `a4`
|
|
477
477
|
- Added `handle_handoff()` to `Handler`: a shortcut for `handoff(handler).handle()` that takes the target handler as an argument, so it can be passed to `add_callback()` without an extra closure
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|