add .toObject() method to structures (#522)

* add .toObject() method to structures

* add compiled PMChannel change from last commit

* uncomment members in VoiceChannel toObject method
This commit is contained in:
Brian Tanner
2016-08-16 23:53:07 +07:00
committed by abal
parent e42178181d
commit fdfd41dd8c
21 changed files with 426 additions and 58 deletions

View File

@@ -35,6 +35,15 @@ var TextChannel = (function (_ServerChannel) {
/* warning! may return null */
TextChannel.prototype.toObject = function toObject() {
var obj = _ServerChannel.prototype.toObject.call(this);
obj.topic = this.topic;
obj.lastMessageID = this.lastMessageID;
return obj;
};
TextChannel.prototype.setTopic = function setTopic() {
return this.client.setChannelTopic.apply(this.client, _UtilArgumentRegulariser.reg(this, arguments));
};