mirror of
https://github.com/yshtcn/DiaryAssistant_bot.git
synced 2025-12-13 09:40:26 +08:00
引入循环进度条tqdm
This commit is contained in:
parent
54be5fa4d3
commit
152df1a293
@ -5,6 +5,7 @@ from datetime import datetime
|
||||
import os
|
||||
import json
|
||||
import sys
|
||||
from tqdm import tqdm
|
||||
|
||||
proxies = None
|
||||
|
||||
@ -164,7 +165,7 @@ def process_message_queue():
|
||||
|
||||
# 遍历消息队列,尝试发送消息
|
||||
remaining_messages = []
|
||||
for message in message_queue:
|
||||
for message in tqdm(message_queue,desc="send message loop:"):
|
||||
chat_id = message['chat_id']
|
||||
text = message['text']
|
||||
try:
|
||||
@ -200,12 +201,12 @@ def main():
|
||||
process_message_queue()
|
||||
result = set_bot_commands()
|
||||
print(f"set menu:{result}")
|
||||
print("Checking for updates...")
|
||||
print("Check updates,Waiting for response...")
|
||||
updates = get_updates(last_update_id)
|
||||
if updates and "result" in updates:
|
||||
|
||||
print(f"Received updates: {updates}")
|
||||
for update in updates["result"]:
|
||||
for update in tqdm(updates["result"],desc="get result loop:"):
|
||||
Messagetype='message'
|
||||
if 'edited_message' in update:
|
||||
Messagetype='edited_message'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user