mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-12 01:23:31 +01:00
Add support for more OAuth features (#1203)
This commit is contained in:
@@ -361,12 +361,11 @@ class Client extends EventEmitter {
|
||||
|
||||
/**
|
||||
* Obtains the OAuth Application of the bot from Discord.
|
||||
* <warn>This is only available when using a bot account.</warn>
|
||||
* @param {Snowflake} [id='@me'] ID of application to fetch
|
||||
* @returns {Promise<ClientOAuth2Application>}
|
||||
*/
|
||||
fetchApplication() {
|
||||
if (!this.user.bot) throw new Error(Constants.Errors.NO_BOT_ACCOUNT);
|
||||
return this.rest.methods.getMyApplication();
|
||||
fetchApplication(id = '@me') {
|
||||
return this.rest.methods.getApplication(id);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user