Skip to content

Commit

Permalink
add debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
madanalogy committed Nov 13, 2023
1 parent 33c1f61 commit 03fd7b9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,12 @@ async def process(request):
update = telegram.Update.de_json(request.get_json(force=True), bot)
chat_id = update.message.chat.id
response = await get_response(chat_id, update.message.text)
print(f"Response sent: {response}")
await bot.sendMessage(chat_id=chat_id, text=response)


async def get_response(chat_id, text):
print(f"Received chat_id: {chat_id}, msg: {text}")
if text.startswith("/start"):
return constants.INTRO
if text.startswith("/add"):
Expand Down

0 comments on commit 03fd7b9

Please sign in to comment.