mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01:00
docs: improvements in various places
* Client#login example consistency * add warning to Client#fetchApplication * incorrect WEBHOOK_DELETE value
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user