mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 16:43:31 +01:00
Make sendFile() use original file name by default
This commit is contained in:
@@ -460,7 +460,9 @@ export default class InternalClient {
|
||||
}
|
||||
|
||||
// def sendFile
|
||||
sendFile(where, _file, name = "image.png") {
|
||||
sendFile(where, _file, name) {
|
||||
name = name ? name : require('path').basename(attachment);
|
||||
|
||||
return this.resolver.resolveChannel(where)
|
||||
.then(channel =>
|
||||
this.apiRequest("post", Endpoints.CHANNEL_MESSAGES(channel.id), true, null, {
|
||||
|
||||
Reference in New Issue
Block a user