mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 08:33:30 +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:
@@ -18,6 +18,15 @@ export default class TextChannel extends ServerChannel{
|
||||
return this.messages.get("id", this.lastMessageID);
|
||||
}
|
||||
|
||||
toObject() {
|
||||
let obj = super.toObject();
|
||||
|
||||
obj.topic = this.topic;
|
||||
obj.lastMessageID = this.lastMessageID;
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
setTopic(){
|
||||
return this.client.setChannelTopic.apply(this.client, reg(this, arguments));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user