这是一个让报错规范化输出,并让用户反馈触达开发者的插件!
使用包管理器安装
在项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令pip
pip install axtbot-plugin-feedback
pdm
pdm add axtbot-plugin-feedback
poetry
poetry add axtbot-plugin-feedback
使用源码安装
在项目的插件目录下,打开命令行,输入以下内容 ```bash git clone https://github.com/Shanshui2024/axtbot-plugin-feedback ```把src中的文件夹拷贝至插件目录下
打开项目根目录下的 pyproject.toml 文件, 在 [tool.axtbot] 部分追加写入
plugins = ["axtbot_plugin_feedback"]
为使用主动推送功能,请打开机器人在指定群聊的主动消息权限,然后在 .env 文件中输入
FEEDBACK_GROUP_OPENID="你的群OpenID,建议从日志找"对于其他想要加入该功能的插件,可以在发送报错的时候同时发送一个键盘,大概如下:
{
"rows": [
{
"buttons": [
{
"id": "xxx功能:feedback",
"render_data": {
"label": "反馈",
"visited_label": "已反馈",
"style": 3
},
"action": {
"type": 1,
"data": message,
"click_limit": 1,
"permission":{
"type": 0,
"specify_user_ids": [
user_openid
]
}
}
}
]
}
]
}请确保您的反馈按钮ID格式为 xxxx:feedback,传回的 data 可以是报错信息
这样 就可以被该插件读取并使用啦~