mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
Merge pull request #290 from BrunoMoreira991/indev
Fix use of Array as String Resolvable on sendFile with content
This commit is contained in:
@@ -752,10 +752,12 @@ var InternalClient = (function () {
|
||||
}
|
||||
|
||||
return this.resolver.resolveChannel(where).then(function (destination) {
|
||||
var content = _this16.resolver.resolveString(_content);
|
||||
|
||||
if (options.file) {
|
||||
return _this16.resolver.resolveFile(options.file.file).then(function (file) {
|
||||
return _this16.apiRequest("post", _Constants.Endpoints.CHANNEL_MESSAGES(destination.id), true, {
|
||||
content: _content,
|
||||
content: content,
|
||||
tts: options.tts
|
||||
}, {
|
||||
name: options.file.name,
|
||||
@@ -765,8 +767,6 @@ var InternalClient = (function () {
|
||||
});
|
||||
});
|
||||
} else {
|
||||
var content = _this16.resolver.resolveString(_content);
|
||||
|
||||
return _this16.apiRequest("post", _Constants.Endpoints.CHANNEL_MESSAGES(destination.id), true, {
|
||||
content: content,
|
||||
tts: options.tts
|
||||
@@ -779,7 +779,7 @@ var InternalClient = (function () {
|
||||
|
||||
// def sendFile
|
||||
|
||||
InternalClient.prototype.sendFile = function sendFile(where, _file, name, content) {
|
||||
InternalClient.prototype.sendFile = function sendFile(where, _file, name, _content) {
|
||||
var _this17 = this;
|
||||
|
||||
if (!name) {
|
||||
@@ -793,6 +793,8 @@ var InternalClient = (function () {
|
||||
}
|
||||
}
|
||||
|
||||
var content = this.resolver.resolveString(_content);
|
||||
|
||||
if (content) {
|
||||
content = {
|
||||
content: content
|
||||
|
||||
Reference in New Issue
Block a user