mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-12 01:23:31 +01:00
Added error resolving
This commit is contained in:
@@ -545,6 +545,17 @@ var Client = (function () {
|
||||
} else {
|
||||
fstream = file;
|
||||
}
|
||||
|
||||
self.resolveDestination(destination).then(send)["catch"](error);
|
||||
|
||||
function send(destination) {
|
||||
request.post(Endpoints.CHANNELS + "/" + destination + "/messages");
|
||||
}
|
||||
|
||||
function error(err) {
|
||||
callback(err);
|
||||
reject(err);
|
||||
}
|
||||
});
|
||||
}
|
||||
}, {
|
||||
|
||||
Reference in New Issue
Block a user