{"id":13762324,"url":"https://github.com/ShiroDoMain/ATRI-qqbot","last_synced_at":"2025-05-10T15:31:28.502Z","repository":{"id":40416783,"uuid":"296027721","full_name":"ShiroDoMain/ATRI-qqbot","owner":"ShiroDoMain","description":"一个高性能的qqbot","archived":false,"fork":false,"pushed_at":"2023-04-02T02:01:30.000Z","size":32769,"stargazers_count":41,"open_issues_count":1,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-16T21:32:55.484Z","etag":null,"topics":["atribot","chatbot","karas-framework","qqbot","qqrobot"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ShiroDoMain.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-16T12:36:20.000Z","updated_at":"2024-07-01T09:35:12.000Z","dependencies_parsed_at":"2024-08-03T14:16:07.042Z","dependency_job_id":null,"html_url":"https://github.com/ShiroDoMain/ATRI-qqbot","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShiroDoMain%2FATRI-qqbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShiroDoMain%2FATRI-qqbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShiroDoMain%2FATRI-qqbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShiroDoMain%2FATRI-qqbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ShiroDoMain","download_url":"https://codeload.github.com/ShiroDoMain/ATRI-qqbot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253436443,"owners_count":21908331,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["atribot","chatbot","karas-framework","qqbot","qqrobot"],"created_at":"2024-08-03T14:00:38.840Z","updated_at":"2025-05-10T15:31:28.491Z","avatar_url":"https://github.com/ShiroDoMain.png","language":"Python","funding_links":[],"categories":["基于其他语言sdk的应用"],"sub_categories":[],"readme":"# ATRI Project\n![Mirai-console-Version](https://img.shields.io/badge/mirai--console-2.7.1--dev-brightgreen.svg?style=plastic)  \n![Mirai-HTTP-API-Version](https://img.shields.io/badge/mirai--http--api-2.5.0-brightgreen.svg?style=plastic)  \n![Karas-Version](https://img.shields.io/badge/Karas-0.1.4-brightgreen.svg?style=plastic)  \n\n## 使用注解  \nHi！  \n这是一个基于 [mirai](https://github.com/mamoe/mirai) 框架协议，[karas](https://github.com/ShiroDoMain/karas) SDK和 [mirai-api-http](https://github.com/project-mirai/mirai-api-http) 的qqbot  \nPS: 使用本项目的前提您需要先启用一个mirai后端([mcl项目地址](https://github.com/iTXTech/mirai-console-loader))和[mah插件](https://github.com/project-mirai/mirai-api-http)  \n准备完成后使用使用git拉取本项目  \n```shell script\ngit clone https://github.com/ShiroDoMain/ATRI-qqbot\n```\n您需要在cfg.json文件里设置bot参数,安装bot所需要的依赖  \n```shell script\npip3 install -r requirements.txt\n```  \n然后运行文件  \n```shell script\npython3 ATRI.py\n```\n\n## 配置\n\u003cdetails\u003e\n\u003csummary\u003ecfg.json\u003c/summary\u003e  \n\n\u003e cfg.json:  \n\u003e\u003e  botConfig:  \n\u003e\u003e\u003e  botName: 必填,bot的名称  \n\u003e\u003e\u003e  qq: 必填,Bot的qq    \n\u003e\u003e\u003e  verifyKey:必填.Bot的authKey    \n\u003e\u003e\u003e  host:必填,mah的地址  \n\u003e\u003e\u003e  port:必填,mah的端口  \n\u003e\u003e\u003e  ws:默认true，以websocket方式监听  \n\u003e\u003e\u003e  logLevel:日志输出登记。默认info  \n\u003e\u003e\u003e  logToFile:  \n\u003e\u003e\u003e\u003e   enable:是否输出到文件，默认否  \n\u003e\u003e\u003e\u003e   file:日志输出文件，默认为logs/xxxxx.log  \n\u003e\u003e\u003e  nameRouse:默认true，设置为true时可以通过设定的botName交互  \n\u003e\u003e  \n\u003e\u003e  event:  \n\u003e\u003e\u003e   groupEvent:默认true，设置为true时监听群组消息  \n\u003e\u003e\u003e   friendEvent:默认true，设置为true时监听好友消息  \n\u003e\u003e\u003e   tempEvent:默认true，设置为true时监听临时消息  \n\u003e\u003e  \n\u003e\u003e  master:  \n\u003e\u003e\u003e  enable:默认false，设置为true时启用master权限  \n\u003e\u003e\u003e  qq:int，指定拥有与群主和管理员相同能操作bot的权限的用户，有且只有一个  \n\u003e\u003e\n\u003e\u003e  blackList:int列表,bot不想理会的对象  \n\u003e\u003e  \n\u003e\u003e  sticker:  \n\u003e\u003e\u003e    enable:默认true，设置为true时bot可以触发回复指定的sticker  \n\u003e\u003e\u003e    path:stickers存放位置  \n\u003e\u003e  \n\u003e\u003e  storage:文件存放位置，默认为storage  \n\u003e\u003e  \n\u003e\u003e  setu:  \n\u003e\u003e\u003e   enable:默认false，指定为true时触发来点涩图事件  \n\u003e\u003e\u003e   flash:默认true，指定为true时发送形式为闪照    \n\u003e\u003e\u003e   command:str列表，指定触发命令  \n\u003e\u003e\u003e   path:涩图的存放位置  \n\u003e\u003e\n\u003e\u003e  illustrationSearch:  \n\u003e\u003e\u003e   enable:默认true，指定为true时开启以图搜图  \n\u003e\u003e\u003e   command:str列表，指定触发命令  \n\u003e\u003e\n\u003e\u003e  animeSearch:  \n\u003e\u003e\u003e   enable:默认true，指定为true时开启以图搜番\n\u003e\u003e\u003e   command:str列表,指定触发命令\n\u003e\u003e  \n\u003e\u003e  chatBot:  \n\u003e\u003e\u003e   enable: 默认true,指定为true时开启对话机器人  \n\u003e\u003e\u003e   at:默认true,指定为true时被at触发对话  \n\u003e\u003e\u003e   nameRouse:默认true,指定为true时检测到对话中有bot名字触发对话机器人  \n\u003e\u003e\u003e   badRequest:请求异常时触发对话  \n\u003e\u003e\u003e   quote:默认false,指定true时回复相关对话  \n\u003e\u003e\u003e   shield:int数组,不在指定群组触发对话  \n\u003e\u003e\n\u003e\u003e  weather:默认true,指定为true时可以使用天气功能  \n\u003e\u003e  \n\u003e\u003e  shieldGroup:  \n\u003e\u003e\u003e   enable:默认false，指定为true时Bot屏蔽指定群聊\n\u003e\u003e\u003e   list:int列表，屏蔽指定群聊   \n\u003e\u003e  \n\u003e\u003e  onlyGroup:  \n\u003e\u003e\u003e   enable:默认false，指定为true时Bot只监听指定群聊消息  \n\u003e\u003e\u003e   list:int列表，监听指定群聊  \n\u003e\u003e  \n\u003e\u003e  shieldFriend:\n\u003e\u003e\u003e   enable:默认false，指定为true时Bot不会监听指定好友消息  \n\u003e\u003e\u003e   list:int列表，屏蔽指定好友\n\u003c/details\u003e\n\n## 功能\n目前实现的功能有  \n(重构后以下部分功能暂未实现，请等待后续更新)  \n- 以图搜图  \n- 以图搜番  \n- ~~查询疫情~~  \n- 查询天气  \n- 摸头\n- 基础闲聊 \n- 来点涩图  \n- Markov生成:   \n  - #mk[消息]:通过已经学习的消息生成新的消息  \n  - #mke[消息]:对该消息进行预测评估  \n  - #mkt[消息]:对消息进行训练  \n- 还有好多好多功能(~~我忘了~~)  \n## 使用须知  \n此开源项目遵循mirai社区规定开源协议AGPLv3  \n~~注意身体~~  \n\n## Note  \n该项目使用[karas](https://github.com/ShiroDoMain/karas)sdk开发  \n另一开源项目[TimeBot](https://github.com/ShiroDoMain/TimeBot) ，可自行搭配使用 \n\n## 开源  \n本项目使用[GNU AGPLv3](https://github.com/ShiroDoMain/ATRI-qqbot/blob/master/LICENSE) 协议作为开源许可证  \n\n## 鸣谢\n感谢 [mamoe](https://github.com/mamoe) 的 [mirai](https://github.com/mamoe/mirai) 项目给我们带来了快乐  \n\n## Changelog  \n\u003e  \\[2021-07-22]:腾讯ai关闭了机器人示例，删除对应的接口  \n\u003e  \\[2021-07-28]:合并来自 [Siltal](https://github.com/Siltal) 的pr  \n\u003e  \\[2021-07-30]:添加了吃啥  \n\u003e  \\[2021-08-14]:添加对话机器人，修改依赖  \n\u003e  \\[2021-09-12]:Mirai修复图片发送,更新依赖  \n\u003e  \\[2021-09-17]:新增每周天气接口  \n\u003e  \\[2021-09-18]:新增每日天气接口  \n\u003e  \\[2021-10-05]:修改对话机器人接口,添加注意力机制  \n\u003e  \\[2021-10-05]:去除网络天才功能，发布了一个可使用版本  \n\u003e  \\[2021-12-01]:添加好友消息事件  \n\u003e  \\[2022-05-08]:更换了[karas](https://github.com/ShiroDoMain/karas) 框架  \n\u003e  \\[2022-05-25]:新增Markov  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FShiroDoMain%2FATRI-qqbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FShiroDoMain%2FATRI-qqbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FShiroDoMain%2FATRI-qqbot/lists"}