pepperbot/bot.py
2023-08-16 12:20:51 +08:00

41 lines
940 B
Python

from pepperbot import PepperBot
from pepperbot.store.meta import BotRoute
from apps.wuhu_takeoff import WuHuTakeoff
from apps.riic_report_analysis import RIICReportAnalysis, TailoringCommand
bot = PepperBot(port=5800)
bot.register_adapter(
bot_protocol="onebot",
receive_protocol="websocket",
backend_protocol="http",
backend_host="127.0.0.1",
backend_port=5700,
)
bot.apply_routes(
[
BotRoute(
groups="*",
friends=None,
handlers=[WuHuTakeoff],
),
BotRoute(
groups={
"onebot": [
"810857924", # 测试群
"239200680", # mower 1群
"838353939", # mower 2群
]
},
friends=None,
handlers=[RIICReportAnalysis],
commands=[TailoringCommand],
),
]
)
if __name__ == "__main__":
bot.run()