mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
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:
@@ -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));
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user