diff --git a/.gitignore b/.gitignore index 2763391..04b2945 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ __pycache__ .DS_Store .vercel -api/payload.json \ No newline at end of file +api/payload.json +update.json \ No newline at end of file diff --git a/api/index.py b/api/index.py index fb766c8..3f1bc24 100644 --- a/api/index.py +++ b/api/index.py @@ -29,7 +29,7 @@ async def handle(req): try: update = req.json print(update) - msg = update.get('message') + msg = update.get('message', update.get('my_chat_member')) if msg['chat']['id'] == CHAT_ID: chat_id = msg['chat']['id'] member_id = msg['user']['id']