polling-log
This commit is contained in:
parent
f76f4fffca
commit
fb977fe529
3
main.py
3
main.py
|
@ -14,11 +14,12 @@ state = dict()
|
|||
|
||||
|
||||
async def start():
|
||||
logger.info("\tstarted")
|
||||
logger.info("\n\npolling started\n\n")
|
||||
async with ClientSession() as session:
|
||||
offset = 0 # init offset
|
||||
while True:
|
||||
response = await telegram_api("getUpdates", offset=offset, allowed_updates=['message', 'message_reaction'])
|
||||
logger.debug(response)
|
||||
if isinstance(response, dict):
|
||||
result = response.get("result", [])
|
||||
for update in result:
|
||||
|
|
Loading…
Reference in New Issue
Block a user