UNPKG

@tsuk1ko/cq-websocket

Version:

A Node SDK for developing QQ chatbots based on WebSocket, which is depending on CoolQ and CQHTTP API plugin.

23 lines (19 loc) 465 B
const CQTag = require('../CQTag'); module.exports = class CQBFace extends CQTag { /** * @param {number} id * @param {string} p the unknown, mysterious "P" * @see https://github.com/richardchien/coolq-http-api/wiki/CQ-%E7%A0%81%E7%9A%84%E5%9D%91 */ constructor(id, p) { super('bface', { id }); this.modifier.p = p; } get id() { return this.data.id; } coerce() { this.data.id = Number(this.data.id); return this; } };