浏览代码

Merge pull request #2153 from 6vision/update_linkaibot

support more file types.
master
vision GitHub 4 个月前
父节点
当前提交
f7a2c97943
找不到此签名对应的密钥 GPG 密钥 ID: B5690EEEBB952194
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. +2
    -1
      bot/linkai/link_ai_bot.py

+ 2
- 1
bot/linkai/link_ai_bot.py 查看文件

@@ -399,6 +399,7 @@ class LinkAIBot(Bot):
return
max_send_num = conf().get("max_media_send_count")
send_interval = conf().get("media_send_interval")
file_type = (".pdf", ".doc", ".docx", ".csv", ".xls", ".xlsx", ".txt", ".rtf", ".ppt", ".pptx")
try:
i = 0
for url in image_urls:
@@ -407,7 +408,7 @@ class LinkAIBot(Bot):
i += 1
if url.endswith(".mp4"):
reply_type = ReplyType.VIDEO_URL
elif url.endswith(".pdf") or url.endswith(".doc") or url.endswith(".docx") or url.endswith(".csv"):
elif url.endswith(file_type):
reply_type = ReplyType.FILE
url = _download_file(url)
if not url:


正在加载...
取消
保存