{"id":16718589,"url":"https://github.com/codfrm/qqbot-official","last_synced_at":"2025-04-10T08:54:07.483Z","repository":{"id":166676305,"uuid":"433364874","full_name":"CodFrm/qqbot-official","owner":"CodFrm","description":"官方的qqbot https://bot.q.qq.com/wiki/develop/api/","archived":false,"fork":false,"pushed_at":"2022-02-10T03:10:52.000Z","size":101,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T08:11:10.319Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CodFrm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2021-11-30T09:15:10.000Z","updated_at":"2024-11-22T06:35:15.000Z","dependencies_parsed_at":"2023-06-01T15:00:32.315Z","dependency_job_id":null,"html_url":"https://github.com/CodFrm/qqbot-official","commit_stats":null,"previous_names":["codfrm/qqbot-official"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodFrm%2Fqqbot-official","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodFrm%2Fqqbot-official/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodFrm%2Fqqbot-official/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodFrm%2Fqqbot-official/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CodFrm","download_url":"https://codeload.github.com/CodFrm/qqbot-official/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248190407,"owners_count":21062277,"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":[],"created_at":"2024-10-12T21:37:41.359Z","updated_at":"2025-04-10T08:54:07.474Z","avatar_url":"https://github.com/CodFrm.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## QQ频道机器人\n\n\u003e 有很多自用的功能,也有一个简单的机器人命令框架,自用功能可以直接编译然后配置好配置文件就可使用\n\n### 命令框架\n\n参考gin的设计,实现命令框架\n\n```go\n// init\ncmd := command.NewCommand(me, api)\n// 只会响应管理员艾特me的消息\ncg := cmd.Group(command.AtMe(), middleware.Admin)\ncg.Match(\"警告\", p.punish)\ncg.Match(\"移除警告\", p.remove)\n\n// 匹配艾特命令+摇色子\ncmd.AtMeMatch(\"摇色子|摇骰子\", func (ctx *command.Context) {\n\tctx.ReplyText(fmt.Sprintf(\"%v\", rand.Int31n(6)+1))\n})\n```\n\n### 机器人\n\n#### 机器人命令\n\n\u003e 以下是本仓库的机器人命令,语料配置可以查看:[语料配置模版.csv](./docs/语料配置模版.csv)\n\n| 命令                         | 返回                | 备注                             |\n|----------------------------|-------------------|--------------------------------|\n| 警告                         | 管理员警告用户           | 需要艾特并且是管理员权限才会触发               |\n| 我的信息                       | 返回用户信息、警告等级、用户组选择 | 警告成员无法获得用户信息                   |\n| 摇色子/摇骰子                    | 回复1-6             |                                |\n| 早睡打卡                       | 打卡成功              | 晚上11点前才能打卡,配合早起打卡使用            |\n| 早起打卡                       | 打卡成功              | 早上8点前并且需要前一天有早睡打卡记录,成功增加积分     |\n| 打卡耻辱榜                      | 成员信息              | 返回未达成条件的打卡人员                   |\n| 打卡                         | 打卡成功              | 增加积分                           |\n| 早八人打卡                      | 打卡成功              | 8点前打卡                          |\n| 单词分享打卡                     | 打卡成功              | 分享单词卡片进行打卡                     |\n| 设置打卡频道 [功能]                | 设置成功              | 由频道主设置打卡频道 功能：学习、早起            |\n| 设置通知频道 [功能] [时间] [标题] [文案] | 设置成功              | 由频道主设置通知频道 功能：学习、早起 时间为cron表达式 |\n\n#### 配置和启动\n\n将目录下的`config.yaml.example`复制粘贴一份`config.yaml`并修改其中的配置,然后直接启动编译好的二进制程序即可\n\n#### 资源文件\n\n机器人所使用的资源文件放在`./assets`目录下方\n\n| 文件               | 作用        |\n|------------------|-----------|\n| images/sleep.jpg | 用于晚睡打卡的图片 |\n| images/getup.jpg |用于早起打卡的图片|\n\n### 机器人申请\n\n机器人的申请方式请看:[QQ机器人](https://bot.q.qq.com/wiki/)\n\n#### 常见问题\n\n\u003e 很多申请的东西和新更新的咨询需要加入`QQ机器人官方频道`获取\n\n* [完善信息时测试频道ID如何获取](https://github.com/CodFrm/qqbot-official/issues/1)\n* 主动推送消息限制:公域每日2条,私域每日100条(可能变化)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodfrm%2Fqqbot-official","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodfrm%2Fqqbot-official","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodfrm%2Fqqbot-official/lists"}