This package has been deprecated

Author message:

dont use this

@ionjs/adapter-cqhttp
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

@ionjs/adapter-cqhttp

@ionjs/adapter-* logo

GitHub Org GitHub Build status npm (scoped) Language grade: JavaScript GitHub code size in bytes

@ionjs/adapter-cqhttp is a combination of message receiver and sender for @richardchien/coolq-http-api.

Getting Started

@ionjs/adapter-cqhttp can be included in your codes like this:

npm install --save @ionjs/adapter-cqhttp
import { Receiver, Sender, CQCode } from '@ionjs/adapter-cqhttp'
const secret = 'my-secret', receiverPort = 8080
const token = 'my-token', sendURL = 'https://localhost:5700'
const receiver = new CQReceiver(secret)
const sender = new CQSender(sendURL, token)
receiver.listen(receiverPort)
receiver.on('message', msg => { 
    sender.to(msg).send(CQCode.Anonymous(), 'testing message sending through ionjs!', CQCode.Emoji(137))
})

The full explanation of the codes above is in the docs.

Contribution

  • Become a stargazer if you are interested!
  • ionjs currently have only few contributors, so PRs and issues are very welcomed.

/@ionjs/adapter-cqhttp/

    Package Sidebar

    Install

    npm i @ionjs/adapter-cqhttp

    Weekly Downloads

    9

    Version

    0.2.0

    License

    MIT

    Unpacked Size

    38.5 kB

    Total Files

    23

    Last publish

    Collaborators

    • awaiting
    • trustless