代码fork自WeRoBot,修改成基于sanic的异步框架
pip install aiowerobot
from aiowerobot import AioWeRoBot
robot = AioWeRoBot(app_id='', app_secret='', token='')
@robot.handler
async def hello(message):
return 'Hello World!'
config = {'host': '0.0.0.0', 'port': 8099}
robot.run(**config)