mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
ability to send file via sendMessage
This commit is contained in:
@@ -251,6 +251,11 @@ var Client = (function (_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