Webpack build for branch master: 63f6247ce5

This commit is contained in:
Travis CI 2017-09-09 21:45:10 +00:00
parent bfd3de9eec
commit 01db2d623f
2 changed files with 12 additions and 8 deletions

View file

@ -5505,7 +5505,7 @@ class MessageEmbed {
* @property {string} value The value of this field * @property {string} value The value of this field
* @property {boolean} inline If this field will be displayed inline * @property {boolean} inline If this field will be displayed inline
*/ */
this.fields = data.fields || []; this.fields = data.fields ? data.fields.map(Util.cloneObject) : [];
/** /**
* The thumbnail of this embed (if there is one) * The thumbnail of this embed (if there is one)
@ -5589,8 +5589,13 @@ class MessageEmbed {
* @property {Array<FileOptions|string|MessageAttachment>} files Files to attach * @property {Array<FileOptions|string|MessageAttachment>} files Files to attach
*/ */
if (data.files) { if (data.files) {
for (let file of data.files) if (file instanceof MessageAttachment) file = file.file; this.files = data.files.map(file => {
} else { data.files = null; } if (file instanceof MessageAttachment) {
return typeof file.file === 'string' ? file.file : Util.cloneObject(file.file);
}
return file;
});
}
} }
/** /**
@ -9523,10 +9528,9 @@ class Guild extends Base {
} }
_sortedChannels(channel) { _sortedChannels(channel) {
if (channel.type === Constants.ChannelTypes.CATEGORY) { const category = channel.type === Constants.ChannelTypes.CATEGORY;
return Util.discordSort(this.channels.filter(c => c.type === Constants.ChannelTypes.CATEGORY)); return Util.discordSort(this.channels.filter(c =>
} c.type === channel.type && (category || c.parent === channel.parent)));
return Util.discordSort(this.channels.filter(c => c.parent === channel.parent));
} }
} }

File diff suppressed because one or more lines are too long