chore: переезд на serWebhook
This commit is contained in:
1 parent
45e7a1d22f
commit
f1414e5ace
42 files changed
+1391
-224
No files matched your search
@@ -33,7 +33,12 @@ class FakeApi:
|
||||
|
||||
|
||||
def message_update(update_id: int, text: str, chat_type: str = 'private', user_id: int = USER_ID) -> types.Update:
|
||||
return types.Update.de_json({
|
||||
return types.Update.de_json(message_update_json(update_id, text, chat_type, user_id))
|
||||
|
||||
|
||||
def message_update_json(update_id: int, text: str, chat_type: str = 'private', user_id: int = USER_ID) -> dict:
|
||||
"""Обновление с сообщением в том виде, в каком его присылает Bot API."""
|
||||
return {
|
||||
'update_id': update_id,
|
||||
'message': {
|
||||
'message_id': update_id,
|
||||
@@ -43,7 +48,7 @@ def message_update(update_id: int, text: str, chat_type: str = 'private', user_i
|
||||
'title': 'group' if chat_type != 'private' else None},
|
||||
'from': {'id': user_id, 'is_bot': False, 'first_name': 'Ann', 'username': f'user{user_id}'},
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
class Conversation:
|
||||
|
||||
Reference in new issue
Block a user