mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 17:13:31 +01:00
Add getOAuthApplication()
This commit is contained in:
@@ -1176,6 +1176,17 @@ export default class Client extends EventEmitter {
|
||||
.then(dataCallback(callback), errorCallback(callback));
|
||||
}
|
||||
|
||||
// def getOAuthApplication
|
||||
getOAuthApplication(appID, callback = (/*err, bans*/) => { }) {
|
||||
if (typeof appID === "function") {
|
||||
// appID is the callback
|
||||
callback = appID;
|
||||
appID = null;
|
||||
}
|
||||
return this.internal.getOAuthApplication(appID)
|
||||
.then(dataCallback(callback), errorCallback(callback));
|
||||
}
|
||||
|
||||
// def awaitResponse
|
||||
awaitResponse(msg, toSend = null, options = null, callback = (/*err, newMsg*/) => { }) {
|
||||
var ret;
|
||||
|
||||
@@ -1537,6 +1537,12 @@ export default class InternalClient {
|
||||
return this.apiRequest("delete", `${Endpoints.FRIENDS}/${user.id}`, true);
|
||||
}
|
||||
|
||||
//def getOAuthApplication
|
||||
getOAuthApplication(appID) {
|
||||
appID = appID || "@me";
|
||||
return this.apiRequest("get", Endpoints.OAUTH2_APPLICATION(appID), true);
|
||||
}
|
||||
|
||||
//def ack
|
||||
ack(msg) {
|
||||
msg = this.resolver.resolveMessage(msg);
|
||||
|
||||
Reference in New Issue
Block a user