python-vk-bot 0.8.0__tar.gz → 0.8.1__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.
- {python_vk_bot-0.8.0 → python_vk_bot-0.8.1}/CHANGELOG.md +8 -0
- {python_vk_bot-0.8.0 → python_vk_bot-0.8.1}/PKG-INFO +1 -1
- {python_vk_bot-0.8.0 → python_vk_bot-0.8.1}/pyproject.toml +1 -1
- {python_vk_bot-0.8.0 → python_vk_bot-0.8.1}/python_vk_bot/bot.py +29 -0
- {python_vk_bot-0.8.0 → python_vk_bot-0.8.1}/.gitignore +0 -0
- {python_vk_bot-0.8.0 → python_vk_bot-0.8.1}/LICENSE +0 -0
- {python_vk_bot-0.8.0 → python_vk_bot-0.8.1}/README.md +0 -0
- {python_vk_bot-0.8.0 → python_vk_bot-0.8.1}/docs/decisions/README.md +0 -0
- {python_vk_bot-0.8.0 → python_vk_bot-0.8.1}/examples/README.md +0 -0
- {python_vk_bot-0.8.0 → python_vk_bot-0.8.1}/python_vk_bot/.agents/skills/telegram-to-vk/SKILL.md +0 -0
- {python_vk_bot-0.8.0 → python_vk_bot-0.8.1}/python_vk_bot/.agents/skills/telegram-to-vk/references/migration-mapping.md +0 -0
- {python_vk_bot-0.8.0 → python_vk_bot-0.8.1}/python_vk_bot/__init__.py +0 -0
- {python_vk_bot-0.8.0 → python_vk_bot-0.8.1}/python_vk_bot/_config.py +0 -0
- {python_vk_bot-0.8.0 → python_vk_bot-0.8.1}/python_vk_bot/application.py +0 -0
- {python_vk_bot-0.8.0 → python_vk_bot-0.8.1}/python_vk_bot/callback.py +0 -0
- {python_vk_bot-0.8.0 → python_vk_bot-0.8.1}/python_vk_bot/context.py +0 -0
- {python_vk_bot-0.8.0 → python_vk_bot-0.8.1}/python_vk_bot/errors.py +0 -0
- {python_vk_bot-0.8.0 → python_vk_bot-0.8.1}/python_vk_bot/filters.py +0 -0
- {python_vk_bot-0.8.0 → python_vk_bot-0.8.1}/python_vk_bot/handlers.py +0 -0
- {python_vk_bot-0.8.0 → python_vk_bot-0.8.1}/python_vk_bot/limits.py +0 -0
- {python_vk_bot-0.8.0 → python_vk_bot-0.8.1}/python_vk_bot/long_poll.py +0 -0
- {python_vk_bot-0.8.0 → python_vk_bot-0.8.1}/python_vk_bot/models/__init__.py +0 -0
- {python_vk_bot-0.8.0 → python_vk_bot-0.8.1}/python_vk_bot/models/api.py +0 -0
- {python_vk_bot-0.8.0 → python_vk_bot-0.8.1}/python_vk_bot/models/attachments.py +0 -0
- {python_vk_bot-0.8.0 → python_vk_bot-0.8.1}/python_vk_bot/models/base.py +0 -0
- {python_vk_bot-0.8.0 → python_vk_bot-0.8.1}/python_vk_bot/models/donut.py +0 -0
- {python_vk_bot-0.8.0 → python_vk_bot-0.8.1}/python_vk_bot/models/event_answers.py +0 -0
- {python_vk_bot-0.8.0 → python_vk_bot-0.8.1}/python_vk_bot/models/events.py +0 -0
- {python_vk_bot-0.8.0 → python_vk_bot-0.8.1}/python_vk_bot/models/keyboards.py +0 -0
- {python_vk_bot-0.8.0 → python_vk_bot-0.8.1}/python_vk_bot/models/messages.py +0 -0
- {python_vk_bot-0.8.0 → python_vk_bot-0.8.1}/python_vk_bot/py.typed +0 -0
- {python_vk_bot-0.8.0 → python_vk_bot-0.8.1}/python_vk_bot/queues.py +0 -0
- {python_vk_bot-0.8.0 → python_vk_bot-0.8.1}/python_vk_bot/settings.py +0 -0
- {python_vk_bot-0.8.0 → python_vk_bot-0.8.1}/python_vk_bot/transport.py +0 -0
|
@@ -4,6 +4,14 @@ All notable changes will be documented here, following Keep a Changelog.
|
|
|
4
4
|
|
|
5
5
|
## Unreleased
|
|
6
6
|
|
|
7
|
+
## 0.8.1 - 2026-11-26
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- `Bot.get_message` returns `None` only for confirmed absence and raises
|
|
12
|
+
`InvalidResponseError` for malformed counts or mismatched message identifiers.
|
|
13
|
+
Invalid input identifiers raise `ValueError` before any HTTP request.
|
|
14
|
+
|
|
7
15
|
## 0.8.0 - 2026-11-26
|
|
8
16
|
|
|
9
17
|
### Added
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: python-vk-bot
|
|
3
|
-
Version: 0.8.
|
|
3
|
+
Version: 0.8.1
|
|
4
4
|
Summary: An asynchronous framework for VK community bots.
|
|
5
5
|
Project-URL: Homepage, https://github.com/fomenko-ai/python-vk-bot
|
|
6
6
|
Project-URL: Repository, https://github.com/fomenko-ai/python-vk-bot
|
|
@@ -163,10 +163,39 @@ class Bot:
|
|
|
163
163
|
return users[0] if users else None
|
|
164
164
|
|
|
165
165
|
async def get_message(self, peer_id: int, conversation_message_id: int) -> Message | None:
|
|
166
|
+
"""Fetch one message, returning None only for confirmed absence.
|
|
167
|
+
|
|
168
|
+
Invalid identifiers raise ValueError before the request. Malformed or
|
|
169
|
+
inconsistent responses raise InvalidResponseError; API and transport
|
|
170
|
+
errors propagate unchanged. No retries or fallback requests are made.
|
|
171
|
+
"""
|
|
172
|
+
peer_id = _peer_identifier(peer_id)
|
|
173
|
+
conversation_message_id = _message_identifier(None, conversation_message_id)
|
|
166
174
|
result = await self.request(
|
|
167
175
|
"messages.getByConversationMessageId",
|
|
168
176
|
{"peer_id": peer_id, "conversation_message_ids": conversation_message_id},
|
|
169
177
|
)
|
|
178
|
+
if not isinstance(result, dict):
|
|
179
|
+
raise InvalidResponseError("Invalid message lookup response")
|
|
180
|
+
count = result.get("count")
|
|
181
|
+
items = result.get("items")
|
|
182
|
+
if (
|
|
183
|
+
type(count) is not int
|
|
184
|
+
or count not in (0, 1)
|
|
185
|
+
or not isinstance(items, list)
|
|
186
|
+
or count != len(items)
|
|
187
|
+
):
|
|
188
|
+
raise InvalidResponseError("Invalid message lookup count or items")
|
|
189
|
+
if count == 1:
|
|
190
|
+
item = items[0]
|
|
191
|
+
if not isinstance(item, dict) or any(
|
|
192
|
+
type(item.get(field)) is not int or item[field] != expected
|
|
193
|
+
for field, expected in (
|
|
194
|
+
("peer_id", peer_id),
|
|
195
|
+
("conversation_message_id", conversation_message_id),
|
|
196
|
+
)
|
|
197
|
+
):
|
|
198
|
+
raise InvalidResponseError("Message lookup result has unexpected identifiers")
|
|
170
199
|
page = _parse(MessagePage, result)
|
|
171
200
|
return page.items[0] if page.items else None
|
|
172
201
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_vk_bot-0.8.0 → python_vk_bot-0.8.1}/python_vk_bot/.agents/skills/telegram-to-vk/SKILL.md
RENAMED
|
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
|