{"id":20210518,"url":"https://github.com/lc-cn/icqq2-cq-enable","last_synced_at":"2025-04-10T13:21:41.341Z","repository":{"id":37729933,"uuid":"489844621","full_name":"lc-cn/icqq2-cq-enable","owner":"lc-cn","description":"让oicq2.x支持cq码","archived":false,"fork":false,"pushed_at":"2023-10-24T14:51:54.000Z","size":17,"stargazers_count":7,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T12:05:59.123Z","etag":null,"topics":["bot","cqhttp-api","oicq","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lc-cn.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}},"created_at":"2022-05-08T04:25:31.000Z","updated_at":"2024-06-06T11:21:24.000Z","dependencies_parsed_at":"2023-01-17T17:00:46.898Z","dependency_job_id":null,"html_url":"https://github.com/lc-cn/icqq2-cq-enable","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":"l-collect/ts-dev-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lc-cn%2Ficqq2-cq-enable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lc-cn%2Ficqq2-cq-enable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lc-cn%2Ficqq2-cq-enable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lc-cn%2Ficqq2-cq-enable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lc-cn","download_url":"https://codeload.github.com/lc-cn/icqq2-cq-enable/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248225661,"owners_count":21068078,"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":["bot","cqhttp-api","oicq","typescript"],"created_at":"2024-11-14T05:48:14.134Z","updated_at":"2025-04-10T13:21:41.311Z","avatar_url":"https://github.com/lc-cn.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# oicq2-cq-enable\n让oicq2.x支持cq码\n使用方法：\n\n1.安装依赖\n```shell\nnpm install oicq2-cq-enable # 如果你使用的是npm管理依赖\nyarn add oicq2-cq-enable #  如果你使用的是yarn管理依赖\n```\n2.在你的项目入口文件最开头导入依赖\n\n(需在`createClient`之前，否则sendMsg时将不会自动转换cq码)\n\njs\n```javascript\nrequire('oicq2-cq-enable')\n// 其他依赖\nconst {createClient}=require('oicq')\n// 你的代码\n```\nts\n```typescript\nimport 'oicq2-cq-enable'\n// 其他依赖\nimport {createClient} from 'oicq'\n// 你的代码\n```\n然后，你的Client的message相关事件的event将会携带cqCode参数，\nevent的reply和一切sendMsg将支持直接发送cq码\n## 消息段-CQ码互转\n### 消息段-\u003eCQ码\nfromSegment\n### CQ码-\u003e消息段\ntoSegment\n## 消息-CQ码互转\n### 消息-\u003eCQ码\ntoCqcode\n### CQ码-\u003e消息\nfromCqcode\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flc-cn%2Ficqq2-cq-enable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flc-cn%2Ficqq2-cq-enable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flc-cn%2Ficqq2-cq-enable/lists"}