mirror of
https://github.com/danbulant/discord.js
synced 2026-05-27 22:11:53 +00:00
docs: improvements in various places
* Client#login example consistency * add warning to Client#fetchApplication * incorrect WEBHOOK_DELETE value
This commit is contained in:
parent
448f38429d
commit
3d82ca901b
2 changed files with 5 additions and 2 deletions
|
|
@ -271,7 +271,9 @@ class Client extends EventEmitter {
|
|||
* @param {string} token Token of the account to log in with
|
||||
* @returns {Promise<string>} Token of the account used
|
||||
* @example
|
||||
* client.login('my token');
|
||||
* client.login('my token')
|
||||
* .then(console.log)
|
||||
* .catch(console.error);
|
||||
*/
|
||||
login(token = this.token) {
|
||||
return this.rest.methods.login(token);
|
||||
|
|
@ -390,6 +392,7 @@ class Client extends EventEmitter {
|
|||
|
||||
/**
|
||||
* 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
|
||||
* @returns {Promise<OAuth2Application>}
|
||||
* client.fetchApplication('id')
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ const Targets = {
|
|||
* * INVITE_DELETE: 42
|
||||
* * WEBHOOK_CREATE: 50
|
||||
* * WEBHOOK_UPDATE: 51
|
||||
* * WEBHOOK_DELETE: 50
|
||||
* * WEBHOOK_DELETE: 52
|
||||
* * EMOJI_CREATE: 60
|
||||
* * EMOJI_UPDATE: 61
|
||||
* * EMOJI_DELETE: 62
|
||||
|
|
|
|||
Loading…
Reference in a new issue