mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01:00
ability to send file via sendMessage
This commit is contained in:
@@ -364,6 +364,11 @@ export default class Client extends EventEmitter {
|
||||
callback = options;
|
||||
options = {};
|
||||
}
|
||||
if (typeof content === "object" && content.file) {
|
||||
// content has file
|
||||
options = content;
|
||||
content = "";
|
||||
}
|
||||
|
||||
return this.internal.sendMessage(destination, content, options)
|
||||
.then(dataCallback(callback), errorCallback(callback));
|
||||
|
||||
Reference in New Issue
Block a user