icqq-cq-enable
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

oicq2-cq-enable

让oicq2.x支持cq码 使用方法:

1.安装依赖

npm install oicq2-cq-enable # 如果你使用的是npm管理依赖
yarn add oicq2-cq-enable #  如果你使用的是yarn管理依赖

2.在你的项目入口文件最开头导入依赖

(需在createClient之前,否则sendMsg时将不会自动转换cq码)

js

require('oicq2-cq-enable')
// 其他依赖
const {createClient}=require('oicq')
// 你的代码

ts

import 'oicq2-cq-enable'
// 其他依赖
import {createClient} from 'oicq'
// 你的代码

然后,你的Client的message相关事件的event将会携带cqCode参数, event的reply和一切sendMsg将支持直接发送cq码

消息段-CQ码互转

消息段->CQ码

fromSegment

CQ码->消息段

toSegment

消息-CQ码互转

消息->CQ码

toCqcode

CQ码->消息

fromCqcode

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.1
    14
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.1
    14
  • 1.0.0
    1

Package Sidebar

Install

npm i icqq-cq-enable

Weekly Downloads

15

Version

1.0.1

License

MIT

Unpacked Size

11.3 kB

Total Files

7

Last publish

Collaborators

  • lc_cn