mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
Make sendFile() use original file name by default
This commit is contained in:
@@ -190,7 +190,9 @@ export default class Client extends EventEmitter {
|
||||
}
|
||||
|
||||
// def sendFile
|
||||
sendFile(where, attachment, name = "image.png", callback = (/*err, m*/) => { }) {
|
||||
sendFile(where, attachment, name, callback = (/*err, m*/) => { }) {
|
||||
name = name ? name : require('path').basename(attachment);
|
||||
|
||||
return this.internal.sendFile(where, attachment, name)
|
||||
.then(dataCallback(callback), errorCallback(callback));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user