mirror of
https://github.com/danbulant/discord.js
synced 2026-07-06 03:31:03 +00:00
Fix obligatory content on sendFile (#292)
This commit is contained in:
parent
68a21ee679
commit
a5517c2c3b
2 changed files with 5 additions and 9 deletions
|
|
@ -791,7 +791,7 @@ var InternalClient = (function () {
|
||||||
|
|
||||||
// def sendFile
|
// def sendFile
|
||||||
|
|
||||||
InternalClient.prototype.sendFile = function sendFile(where, _file, name, _content) {
|
InternalClient.prototype.sendFile = function sendFile(where, _file, name, content) {
|
||||||
var _this18 = this;
|
var _this18 = this;
|
||||||
|
|
||||||
if (!name) {
|
if (!name) {
|
||||||
|
|
@ -805,11 +805,9 @@ var InternalClient = (function () {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var content = this.resolver.resolveString(_content);
|
|
||||||
|
|
||||||
if (content) {
|
if (content) {
|
||||||
content = {
|
content = {
|
||||||
content: content
|
content: this.resolver.resolveString(content)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -648,7 +648,7 @@ export default class InternalClient {
|
||||||
}
|
}
|
||||||
|
|
||||||
// def sendFile
|
// def sendFile
|
||||||
sendFile(where, _file, name, _content) {
|
sendFile(where, _file, name, content) {
|
||||||
if (!name) {
|
if (!name) {
|
||||||
if (_file instanceof String || typeof _file === "string") {
|
if (_file instanceof String || typeof _file === "string") {
|
||||||
name = require("path").basename(_file);
|
name = require("path").basename(_file);
|
||||||
|
|
@ -660,11 +660,9 @@ export default class InternalClient {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var content = this.resolver.resolveString(_content);
|
if (content) {
|
||||||
|
|
||||||
if(content) {
|
|
||||||
content = {
|
content = {
|
||||||
content
|
content: this.resolver.resolveString(content)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue