🐛 修复群组申请通知 (#2026)
检查bot是否运行正常 / bot check (push) Waiting to run
CodeQL Code Security Analysis / Analyze (${{ matrix.language }}) (none, javascript-typescript) (push) Waiting to run
CodeQL Code Security Analysis / Analyze (${{ matrix.language }}) (none, python) (push) Waiting to run
Sequential Lint and Type Check / ruff-call (push) Waiting to run
Sequential Lint and Type Check / pyright-call (push) Blocked by required conditions
Release Drafter / Update Release Draft (push) Waiting to run
Force Sync to Aliyun / sync (push) Waiting to run
Update Version / update-version (push) Waiting to run

* ✨ 修复一些bug

- 移除不必要的定时器类,简化代码结构
- 优化好友请求处理逻辑,确保在自动同意和手动处理之间的清晰区分
- 更新缓存机制,避免重复处理相同的好友请求
- 新增判断文件是否为二进制文件的功能,提升文件处理的准确性
- 优化缓存字典的过期检查逻辑,提高性能和可读性

* ✨ 更新 get_async_client 函数,支持字符串类型的代理参数

- 修改 proxies 参数类型,允许传入字符串形式的代理地址
- 增强代理处理逻辑,将字符串代理转换为字典格式,提升灵活性和可用性
This commit is contained in:
HibiKier
2025-08-19 16:20:52 +08:00
committed by GitHub
parent 6124e217d0
commit f9a38a26b2
4 changed files with 83 additions and 92 deletions
+1 -6
View File
@@ -82,12 +82,7 @@ class CacheDict(Generic[T]):
return False
# 检查是否过期
data = self._data[key]
if data.expire_time > 0 and data.expire_time < time.time():
del self._data[key]
return False
return True
return bool(self.expire_time(key))
def get(self, key: str, default: Any = None) -> T | None:
"""获取字典项,如果不存在返回默认值