Skip to content

Commit 77110ac

Browse files
authored
Update Chats documentation
1 parent 544aa69 commit 77110ac

1 file changed

Lines changed: 23 additions & 1 deletion

File tree

docs/chats.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ class EventType(str, Enum):
2929
DELETE_MESSAGE = "delete_message"
3030
READ_MESSAGE = "message_read"
3131
TYPING = "user_typing"
32+
EDIT_MESSAGE = "edit_message"
3233

3334
# GENERAL EVENTS
3435
SET_ONLINE = "set_online"
@@ -42,7 +43,8 @@ class EventType(str, Enum):
4243
"chat_type": "direct",
4344
"chat_id": "12_23",
4445
"message": "hello world",
45-
"reply_to": 54
46+
"reply_to": 54,
47+
"is_edited": false
4648
}
4749
}
4850
```
@@ -60,6 +62,12 @@ class EventType(str, Enum):
6062
- `message: str` текст сообщения
6163
- `reply_to: Optional[int]` айди сообщения, на которое кидается ответ. Если его нет, то обязательно кидать `None`
6264

65+
### EDIT_MESSAGE
66+
- `chat_type: str`
67+
- `chat_id` см выше
68+
- `message_id: int` айди сообщение, которое прочитали
69+
- `message: str` текст сообщения
70+
6371
### TYPING
6472
- `chat_type` см выше
6573
- `chat_id` см выше
@@ -140,3 +148,17 @@ class EventType(str, Enum):
140148
}
141149
}
142150
```
151+
152+
##### EventType.EDIT_MESSAGE
153+
154+
```json
155+
{
156+
"type": "edit_message",
157+
"content": {
158+
"chat_type": {{"direct" | "project"}},
159+
"chat_id": {{"id1"_"id2"}}, // например: 1_2
160+
"message_id": {{number}},
161+
"message": {{string}}
162+
}
163+
}
164+
```

0 commit comments

Comments
 (0)