offu / WeRoBot

WeRoBot 是一个微信公众号开发框架

Home Page:https://werobot.readthedocs.io/zh_CN/latest/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

监听无效果 -- Ineffectiveness Monitoring

Kewuaipao opened this issue · comments

  • 对 Bug 的描述

    • 当前行为:监听无回复
    • 正确的行为:当监听过程中收到消息时,自动回复"Hello World"
  • 环境

    • 平台:Windows 11 专业版 Insider Preview Build 25211.rs_prerelease.220923-1354
    • WeRoBot 版本号:未知版本号,为Gitee上文件"Merge pull request #715 from offu/dependabot/pip/cryptography-36.0.2"(2022-03-27由Yuyang Zhang(helloqiu)提交)
    • Python 版本:Python 3.9.3568.0_x64
  • 复现代码或 repo 链接

import werobot

robot = werobot.WeRoBot(token='tokenhere')

@robot.handler
def hello(message):
    return 'Hello World!'

# 让服务器监听在 0.0.0.0:800
robot.config['HOST'] = '0.0.0.0'
robot.config['PORT'] = 800
robot.run()

# 请在这里给出 bug 的复现代码。如有必要,可以创建一个复现 repo 并将链接粘贴到这里。
  • 复现步骤

  • 其他信息

监听设置800是因为80似乎已占用