mirror of
https://github.com/danbulant/discord.js
synced 2026-06-24 17:21:59 +00:00
Webpack build for branch master: 63f6247ce5
This commit is contained in:
parent
bfd3de9eec
commit
01db2d623f
2 changed files with 12 additions and 8 deletions
|
|
@ -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));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
2
discord.master.min.js
vendored
2
discord.master.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue