docs: improvements in various places

* Client#login example consistency

* add warning to Client#fetchApplication

* incorrect WEBHOOK_DELETE value
This commit is contained in:
Lewdcario
2018-06-29 19:30:41 -05:00
parent 448f38429d
commit 3d82ca901b
2 changed files with 5 additions and 2 deletions

View File

@@ -271,7 +271,9 @@ class Client extends EventEmitter {
* @param {string} token Token of the account to log in with * @param {string} token Token of the account to log in with
* @returns {Promise<string>} Token of the account used * @returns {Promise<string>} Token of the account used
* @example * @example
* client.login('my token'); * client.login('my token')
* .then(console.log)
* .catch(console.error);
*/ */
login(token = this.token) { login(token = this.token) {
return this.rest.methods.login(token); return this.rest.methods.login(token);
@@ -390,6 +392,7 @@ class Client extends EventEmitter {
/** /**
* Obtains the OAuth Application of the bot from Discord. * Obtains the OAuth Application of the bot from Discord.
* <warn>Bots can only fetch their own profile.</warn>
* @param {Snowflake} [id='@me'] ID of application to fetch * @param {Snowflake} [id='@me'] ID of application to fetch
* @returns {Promise<OAuth2Application>} * @returns {Promise<OAuth2Application>}
* client.fetchApplication('id') * client.fetchApplication('id')

View File

@@ -57,7 +57,7 @@ const Targets = {
* * INVITE_DELETE: 42 * * INVITE_DELETE: 42
* * WEBHOOK_CREATE: 50 * * WEBHOOK_CREATE: 50
* * WEBHOOK_UPDATE: 51 * * WEBHOOK_UPDATE: 51
* * WEBHOOK_DELETE: 50 * * WEBHOOK_DELETE: 52
* * EMOJI_CREATE: 60 * * EMOJI_CREATE: 60
* * EMOJI_UPDATE: 61 * * EMOJI_UPDATE: 61
* * EMOJI_DELETE: 62 * * EMOJI_DELETE: 62