mirror of
https://github.com/danbulant/discord.js
synced 2026-06-20 07:02:00 +00:00
Webpack build for branch master: db5259cdf1
This commit is contained in:
parent
ef41fd0235
commit
7380e2fb9d
2 changed files with 25 additions and 5 deletions
|
|
@ -3352,6 +3352,8 @@ class TextBasedChannel {
|
|||
options = {};
|
||||
}
|
||||
|
||||
if (options.embed && options.embed.file) options.file = options.embed.file;
|
||||
|
||||
if (options.file) {
|
||||
if (typeof options.file === 'string') options.file = { attachment: options.file };
|
||||
if (!options.file.name) {
|
||||
|
|
@ -13655,6 +13657,12 @@ class RichEmbed {
|
|||
* @type {Object}
|
||||
*/
|
||||
this.footer = data.footer;
|
||||
|
||||
/**
|
||||
* File to upload alongside this Embed
|
||||
* @type {string}
|
||||
*/
|
||||
this.file = data.file;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -13781,6 +13789,18 @@ class RichEmbed {
|
|||
this.footer = { text, icon_url: icon };
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the file to upload alongside the embed. This file can be accessed via `attachment://fileName.extension` when
|
||||
* setting an embed image or author/footer icons. Only one file may be attached.
|
||||
* @param {FileOptions|string} file Local path or URL to the file to attach, or valid FileOptions for a file to attach
|
||||
* @returns {RichEmbed} This embed
|
||||
*/
|
||||
attachFile(file) {
|
||||
if (this.file) throw new RangeError('You may not upload more than one file at once.');
|
||||
this.file = file;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = RichEmbed;
|
||||
|
|
|
|||
10
discord.master.min.js
vendored
10
discord.master.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue