2.4.0-patch3 • Published 4 years ago
@miraipie/http-adapter v2.4.0-patch3
@miraipie/http-adapter
Http Adapter of miraipie.
安装
npm i @miraipie/http-adapter --save
# OR
yarn add @miraipie/http-adapter
使用
import { HttpAdapter } from '@miraipie/http-adapter';
// Node.js user
// const { HttpAdapter } = require('@miraipie/http-adapter');
const adapter = new HttpAdapter({
qq: 123456789, // QQ
verifyKey: 'verifyKey', // mirai-api-http verifyKey
url: 'http://127.0.0.1:3000', // mirai-api-http serve url
interval: 500, // polling interval(optional)
});
adapter.on('message', console.log);
adapter.on('event', console.log);
adapter.on('listened', () => {
console.log('listening...');
});
adapter.listen();
2.4.0-patch3
4 years ago
2.4.0-patch2
4 years ago
2.4.0-patch1
4 years ago
2.4.0
4 years ago
2.3.3
4 years ago