0.2.0 • Published 5 years ago

@ionjs/adapter-cqhttp v0.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

@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.
0.2.0

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

6 years ago

0.1.0

6 years ago