关注数据监听。

This commit is contained in:
liuwei
2025-04-22 11:39:29 +08:00
parent a62bb61901
commit f42f26c910
4 changed files with 57 additions and 47 deletions
+31 -31
View File
@@ -109,37 +109,37 @@ def main(chat_type: int):
print(f"已将新的APP_ID: {app_id} 写入配置文件")
# 同时更新当前配置对象中的APP_ID
config.APP_ID = app_id
# 创建机器人实例
robot = Robot(config, app_id, client, chat_type)
robot.LOG.info(f"WeChatRobot gewechat 成功启动···")
# # 注册Robot实例到callback模块
# from gewechat.api.callback import register_robot
# register_robot(app_id, robot)
# 机器人启动发送测试消息
client.post_text(app_id, send_msg_wxid, "gewechat client 启动成功!")
# 每天 8:30 发送新闻
robot.onEveryTime("08:30", robot.news_baidu_report_auto)
# epic
robot.onEveryTime("10:30", robot.send_epic_free_games)
# message report 1:数据自动从redis 转到sqllite
robot.onEveryTime("02:30", robot.message_count_to_db)
# 从db中提取并发送给相关群
robot.onEveryTime("09:30", robot.generate_and_send_ranking)
# sehuatang
robot.onEveryTime("15:30", robot.generate_sehuatang_pdf)
# 秀人网每天自动下载帖子
robot.onEveryTime("01:30", robot.xiu_ren_download_task)
# 秀人网每天自动发pdf
robot.onEveryTime("17:30", robot.xiu_ren_pdf_send)
#
# # 创建机器人实例
# robot = Robot(config, app_id, client, chat_type)
# robot.LOG.info(f"WeChatRobot gewechat 成功启动···")
#
# # # 注册Robot实例到callback模块
# # from gewechat.api.callback import register_robot
# # register_robot(app_id, robot)
#
# # 机器人启动发送测试消息
# client.post_text(app_id, send_msg_wxid, "gewechat client 启动成功!")
#
# # 每天 8:30 发送新闻
# robot.onEveryTime("08:30", robot.news_baidu_report_auto)
#
# # epic
# robot.onEveryTime("10:30", robot.send_epic_free_games)
#
# # message report 1:数据自动从redis 转到sqllite
# robot.onEveryTime("02:30", robot.message_count_to_db)
# # 从db中提取并发送给相关群
# robot.onEveryTime("09:30", robot.generate_and_send_ranking)
#
# # sehuatang
# robot.onEveryTime("15:30", robot.generate_sehuatang_pdf)
#
# # 秀人网每天自动下载帖子
# robot.onEveryTime("01:30", robot.xiu_ren_download_task)
#
# # 秀人网每天自动发pdf
# robot.onEveryTime("17:30", robot.xiu_ren_pdf_send)
# 启动Dashboard服务器
dashboard_server = None