mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
Add getOAuthApplication()
This commit is contained in:
@@ -1190,6 +1190,19 @@ var Client = (function (_EventEmitter) {
|
||||
return this.internal.removeFriend(user).then(dataCallback(callback), errorCallback(callback));
|
||||
};
|
||||
|
||||
// def getOAuthApplication
|
||||
|
||||
Client.prototype.getOAuthApplication = function getOAuthApplication(appID) {
|
||||
var callback = arguments.length <= 1 || arguments[1] === undefined ? function () /*err, bans*/{} : arguments[1];
|
||||
|
||||
if (typeof appID === "function") {
|
||||
// appID is the callback
|
||||
callback = appID;
|
||||
appID = null;
|
||||
}
|
||||
return this.internal.getOAuthApplication(appID).then(dataCallback(callback), errorCallback(callback));
|
||||
};
|
||||
|
||||
// def awaitResponse
|
||||
|
||||
Client.prototype.awaitResponse = function awaitResponse(msg) {
|
||||
|
||||
@@ -1764,6 +1764,13 @@ var InternalClient = (function () {
|
||||
return this.apiRequest("delete", _Constants.Endpoints.FRIENDS + "/" + user.id, true);
|
||||
};
|
||||
|
||||
//def getOAuthApplication
|
||||
|
||||
InternalClient.prototype.getOAuthApplication = function getOAuthApplication(appID) {
|
||||
appID = appID || "@me";
|
||||
return this.apiRequest("get", _Constants.Endpoints.OAUTH2_APPLICATION(appID), true);
|
||||
};
|
||||
|
||||
//def ack
|
||||
|
||||
InternalClient.prototype.ack = function ack(msg) {
|
||||
|
||||
Reference in New Issue
Block a user