mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 09:03:29 +01:00
Make sendFile() use original file name by default
This commit is contained in:
@@ -568,10 +568,10 @@ var InternalClient = (function () {
|
||||
|
||||
// def sendFile
|
||||
|
||||
InternalClient.prototype.sendFile = function sendFile(where, _file) {
|
||||
InternalClient.prototype.sendFile = function sendFile(where, _file, name) {
|
||||
var _this14 = this;
|
||||
|
||||
var name = arguments.length <= 2 || arguments[2] === undefined ? "image.png" : arguments[2];
|
||||
name = name ? name : require('path').basename(attachment);
|
||||
|
||||
return this.resolver.resolveChannel(where).then(function (channel) {
|
||||
return _this14.apiRequest("post", _Constants.Endpoints.CHANNEL_MESSAGES(channel.id), true, null, {
|
||||
|
||||
Reference in New Issue
Block a user