关注数据监听。

This commit is contained in:
liuwei
2025-04-22 11:42:22 +08:00
parent f42f26c910
commit e810958ec6
2 changed files with 55 additions and 116 deletions

22
main.py
View File

@@ -109,17 +109,17 @@ 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 启动成功!")
# 创建机器人实例
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)