Add RichEmbed#attachFile (#1202)

* Add RichEmbed#attachFile

Mostly for attaching local images that can be accessed within the embed image/author icon/footer icon via `attachment//filename.png` and the like.

* Update docstring to reflect valid param types

* Update TextBasedChannel.js

* Update RichEmbed.js

* Update RichEmbed.js
This commit is contained in:
Zack Campbell
2017-02-21 13:29:37 -06:00
committed by Schuyler Cebulskie
parent d4a84915e6
commit db5259cdf1
2 changed files with 20 additions and 0 deletions

View File

@@ -78,6 +78,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) {