mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2026-10-08 13:20:01 +08:00
🐛 修复群组申请通知 (#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
检查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:
@@ -64,6 +64,25 @@ class ResourceDirManager:
|
||||
cls.__tree_append(path, deep)
|
||||
|
||||
|
||||
def is_binary_file(file_path: str) -> bool:
|
||||
"""判断是否为二进制文件"""
|
||||
binary_extensions = {
|
||||
".jpg",
|
||||
".jpeg",
|
||||
".png",
|
||||
".gif",
|
||||
".bmp",
|
||||
".ico",
|
||||
".pdf",
|
||||
".zip",
|
||||
".rar",
|
||||
".7z",
|
||||
".exe",
|
||||
".dll",
|
||||
}
|
||||
return any(file_path.lower().endswith(ext) for ext in binary_extensions)
|
||||
|
||||
|
||||
def cn2py(word: str) -> str:
|
||||
"""将字符串转化为拼音
|
||||
|
||||
|
||||
Reference in New Issue
Block a user