How to see who and what wrote to the Telegram bot? getUpdates only returns - {"ok":true,"result":[]}
📁 method, Advanced Python Topics
Why does the method:
https://api.telegram.org/botXXXXXXXXXX/getUpdatesonly return:
{""ok"":true,""result"":[]}?
Messages were sent to the bot and it responded to them.
How to get output like:
{""ok"":true,""result"":{""update_id"":8393,""message"":{""message_id"":3,""from"":{""id"":7474,""first_name"": How to remove every second line from a file in Python?
, to transparently create a temporary file, to perform in-place modification:
#!/usr/bin/env python3import fileinputimport oswith fileinput.FileInput(filename, inplace=True, backup='.bak') as file: for i, line in enumerate(file, start=1): if i & 1: # odd print(line, end='') Log in to leave an answer