diff --git a/robot.py b/robot.py index 4ae6e01..4894d1f 100644 --- a/robot.py +++ b/robot.py @@ -7,6 +7,7 @@ import xml.etree.ElementTree as ET from queue import Empty from threading import Thread from datetime import datetime, timedelta +import random from base.func_epic import is_friday, get_free from base.func_zhipu import ZhiPu @@ -284,6 +285,10 @@ class Robot(Job): :param at_list: 要@的wxid, @所有人的wxid为:notify@all """ # msg 中需要有 @ 名单中一样数量的 @ + + # 风控处理,随机延迟发送,解决群消息高频发送导致的微信风险 + time.sleep(random.uniform(0.3, 1.0)) + ats = "" if at_list: if at_list == "notify@all": # @所有人