diff --git a/src/client/Client.js b/src/client/Client.js index 98641abde..861becb2c 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -382,7 +382,7 @@ class Client extends EventEmitter { /** * Obtains the OAuth Application of the bot from Discord. * @param {Snowflake} [id='@me'] ID of application to fetch - * @returns {Promise} + * @returns {Promise} */ fetchApplication(id = '@me') { return this.rest.methods.getApplication(id); diff --git a/src/structures/OAuth2Application.js b/src/structures/OAuth2Application.js index 8a7a0ec48..0e037ab7d 100644 --- a/src/structures/OAuth2Application.js +++ b/src/structures/OAuth2Application.js @@ -94,6 +94,14 @@ class OAuth2Application { * @type {boolean} */ this.secret = data.secret; + + if (data.owner) { + /** + * The owner of this OAuth application + * @type {?User} + */ + this.owner = this.client.dataManager.newUser(data.owner); + } } /**