From f3f4b2be490bf217cba476cc10e9228a559937a6 Mon Sep 17 00:00:00 2001 From: yshtcn Date: Thu, 21 Sep 2023 18:53:28 +0800 Subject: [PATCH] =?UTF-8?q?-=20=E4=BF=AE=E5=A4=8D=E4=BA=86=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E8=B0=83=E7=94=A8=E4=BB=A3=E7=90=86=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E8=8F=9C=E5=8D=95=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Diary Assistant.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Diary Assistant.py b/Diary Assistant.py index 8c8c965..2c7e25b 100644 --- a/Diary Assistant.py +++ b/Diary Assistant.py @@ -59,7 +59,7 @@ def set_bot_commands(): {"command": "done", "description": "结束记录:发送并开始新的记录."}, {"command": "check", "description": "检查记录,已有记录。"} ] - response = requests.post(set_commands_url, json={"commands": commands}) + response = requests.post(set_commands_url, json={"commands": commands}, proxies=proxies) response.raise_for_status() # 如果响应状态码不是200,引发HTTPError异常 return response.json() @@ -111,7 +111,7 @@ def send_message(chat_id, text): def funcion_send_message(chat_id, text, reply_markup=None): url = URL + "sendMessage" params = {'chat_id': chat_id, 'text': text, 'reply_markup': reply_markup} - requests.post(url, params) + requests.post(url, params, proxies=proxies) def process_message_queue(): # 尝试从文件中加载消息队列