@xud6/cq-websocket
Version:
A Node SDK for developing QQ chatbots based on WebSocket, which is depending on CoolQ and CQHTTP API plugin.
22 lines (17 loc) • 357 B
JavaScript
const CQTag = require('../CQTag')
module.exports = class CQMusic extends CQTag {
constructor (type, id) {
super('music', { type, id })
}
get type () {
return this.data.type
}
get id () {
return this.data.id
}
coerce () {
this.data.type = String(this.data.type)
this.data.id = Number(this.data.id)
return this
}
}