加入了黑丝图来功能
This commit is contained in:
21
robot.py
21
robot.py
@@ -40,8 +40,8 @@ from message_report.write_db import write_to_db, generate_and_send_ranking
|
||||
from message_storage.message_to_db import archive_message, get_messages
|
||||
from message_summary.message_summary_4o import message_summary
|
||||
from sehuatang.shehuatang import pdf_file_path
|
||||
from xiuren.meitu_dl import meitu_dowload_pic
|
||||
from xiuren.random_pic import get_xiuren_pic
|
||||
from xiuren.meitu_dl import meitu_dowload_pic, meitu_dowload_pub_pic, meitu_dowload_heisi_pic
|
||||
from xiuren.random_pic import get_xiuren_pic, get_xiuren_heisi_pic
|
||||
from xiuren.xiuren_pdf import generate_pdf_from_images
|
||||
|
||||
|
||||
@@ -180,6 +180,15 @@ class Robot(Job):
|
||||
except Exception as e:
|
||||
self.LOG.error(f"图来发图出错:{e}")
|
||||
return True
|
||||
|
||||
# 暂时只支持4K群要图
|
||||
elif q == "#黑丝图来" and msg.roomid == "45317011307@chatroom":
|
||||
try:
|
||||
file_path = get_xiuren_heisi_pic()
|
||||
self.wcf.send_file(file_path, msg.roomid)
|
||||
except Exception as e:
|
||||
self.LOG.error(f"图来发图出错:{e}")
|
||||
return True
|
||||
# 如果正则匹配到时加群指令,则从库中提取第一个群ID
|
||||
elif match:
|
||||
try:
|
||||
@@ -540,9 +549,13 @@ class Robot(Job):
|
||||
def xiu_ren_download_task(self):
|
||||
try:
|
||||
# 每天下载10组图,然后发一个帖子PDF
|
||||
download_path = meitu_dowload_pic()
|
||||
download_path = meitu_dowload_pub_pic()
|
||||
path = generate_pdf_from_images(download_path)
|
||||
|
||||
self.wcf.send_file(path, "45317011307@chatroom")
|
||||
|
||||
download_path = meitu_dowload_heisi_pic()
|
||||
path = generate_pdf_from_images(download_path)
|
||||
self.wcf.send_file(path, "45317011307@chatroom")
|
||||
|
||||
except Exception as e:
|
||||
self.LOG.error(f"xiuren_dowload_pic error:{e}")
|
||||
|
||||
Reference in New Issue
Block a user