const {query} = require("../client") class Character { /** * @param {string} id * @param {string[]} nicks * @param {string} author * @param {string} name * @param {string} shortName * @param {string} description */ constructor(id, nicks, author, name, shortName, description) { this.id = id this.nicks = nicks this.nick = this.nicks[0] || null this.author = author this.name = name this.shortName = shortName this.description = description } /** * Create a character object from data. */ static fromData(data) { return new Character(data.id, data.nicks, data.author, data.name, data.shortName, data.description) } } module.exports = { Character }