OAuth info stuff (#849)

* OAuth info stuff

* fix docs

* oops
This commit is contained in:
Hackzzila
2016-10-27 15:50:04 -05:00
committed by Amish Shah
parent 986b05442d
commit c9dbf1f7f0
6 changed files with 130 additions and 0 deletions

View File

@@ -324,6 +324,15 @@ class Client extends EventEmitter {
return messages;
}
/**
* Get's the bot's OAuth2 app. Only usable by bot accounts
* @returns {Promise<ClientOAuth2App>}
*/
getMyApp() {
if (!this.user.bot) throw new Error(Constants.Errors.NO_BOT_ACCOUNT);
return this.rest.methods.getMyApp();
}
setTimeout(fn, ...params) {
const timeout = setTimeout(() => {
fn();