Upto12forenglish
commited on
Commit
•
60acb5f
1
Parent(s):
fa22eb9
Update main.py
Browse files
main.py
CHANGED
@@ -35,6 +35,15 @@ async def receive_updates(request: Request):
|
|
35 |
data = await request.json()
|
36 |
print("Received Update:")
|
37 |
print(data)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
# async def receive_message(message: Message):
|
39 |
# print("Received message:", message.message)
|
40 |
# influent_paragraph = message.message
|
|
|
35 |
data = await request.json()
|
36 |
print("Received Update:")
|
37 |
print(data)
|
38 |
+
user_message = data.get('message', {}).get('text', '')
|
39 |
+
message_id = data.get('message', {}).get('message_id', '')
|
40 |
+
user_id = data.get('message', {}).get('from', {}).get('id', '')
|
41 |
+
chat_id = data.get('message', {}).get('chat', {}).get('id', '')
|
42 |
+
|
43 |
+
print(f"User Message: {user_message}")
|
44 |
+
print(f"Original Message ID: {message_id}")
|
45 |
+
print(f"User ID: {user_id}")
|
46 |
+
print(f"Chat ID: {chat_id}")
|
47 |
# async def receive_message(message: Message):
|
48 |
# print("Received message:", message.message)
|
49 |
# influent_paragraph = message.message
|