diff --git a/src/client/Client.js b/src/client/Client.js index 322b227d2..0b4cf17e5 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -109,7 +109,7 @@ class Client extends EventEmitter { /** * A collection of presences for friends of the logged in user. - * This is only filled for user accounts, not bot accounts. + * This is only filled when using a user account. * @type {Collection} */ this.presences = new Collection(); @@ -247,21 +247,20 @@ class Client extends EventEmitter { /** * This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however * if you wish to force a sync of guild data, you can use this. - * This is only applicable to user accounts. + * This is only available when using a user account. * @param {Guild[]|Collection} [guilds=this.guilds] An array or collection of guilds to sync */ syncGuilds(guilds = this.guilds) { - if (!this.user.bot) { - this.ws.send({ - op: 12, - d: guilds instanceof Collection ? guilds.keyArray() : guilds.map(g => g.id), - }); - } + if (this.user.bot) return; + this.ws.send({ + op: 12, + d: guilds instanceof Collection ? guilds.keyArray() : guilds.map(g => g.id), + }); } /** * Caches a user, or obtains it from the cache if it's already cached. - * This is only available to bot accounts. + * This is only available when using a bot account. * @param {string} id The ID of the user to obtain * @returns {Promise} */ @@ -328,7 +327,7 @@ class Client extends EventEmitter { /** * Gets the bot's OAuth2 application. - * This is only available for bot accounts. + * This is only available when using a bot account. * @returns {Promise} */ fetchApplication() { diff --git a/src/structures/ClientUser.js b/src/structures/ClientUser.js index 0fd704849..5aa547300 100644 --- a/src/structures/ClientUser.js +++ b/src/structures/ClientUser.js @@ -25,21 +25,21 @@ class ClientUser extends User { /** * A Collection of friends for the logged in user. - * This is only filled for user accounts, not bot accounts. + * This is only filled when using a user account. * @type {Collection} */ this.friends = new Collection(); /** * A Collection of blocked users for the logged in user. - * This is only filled for user accounts, not bot accounts. + * This is only filled when using a user account. * @type {Collection} */ this.blocked = new Collection(); /** * A Collection of notes for the logged in user. - * This is only filled for user accounts, not bot accounts. + * This is only filled when using a user account. * @type {Collection} */ this.notes = new Collection(); @@ -148,7 +148,7 @@ class ClientUser extends User { /** * Send a friend request - * This is only available for user accounts, not bot accounts. + * This is only available when using a user account. * @param {UserResolvable} user The user to send the friend request to. * @returns {Promise} The user the friend request was sent to. */ @@ -159,7 +159,7 @@ class ClientUser extends User { /** * Remove a friend - * This is only available for user accounts, not bot accounts. + * This is only available when using a user account. * @param {UserResolvable} user The user to remove from your friends * @returns {Promise} The user that was removed */ @@ -170,7 +170,7 @@ class ClientUser extends User { /** * Creates a guild - * This is only available for user accounts, not bot accounts. + * This is only available when using a user account. * @param {string} name The name of the guild * @param {string} region The region for the server * @param {BufferResolvable|Base64Resolvable} [icon=null] The icon for the guild diff --git a/src/structures/Guild.js b/src/structures/Guild.js index 73b3e45df..ffbe580ca 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -539,7 +539,7 @@ class Guild { /** * Syncs this guild (already done automatically every 30 seconds). - * This is only applicable to user accounts. + * This is only available when using a user account. */ sync() { if (!this.client.user.bot) this.client.syncGuilds([this]); diff --git a/src/structures/User.js b/src/structures/User.js index bb02003c7..28e8f73b5 100644 --- a/src/structures/User.js +++ b/src/structures/User.js @@ -99,7 +99,7 @@ class User { /** * The note that is set for the user - * This is only available for user accounts. + * This is only available when using a user account. * @type {?string} * @readonly */ @@ -147,7 +147,7 @@ class User { /** * Sends a friend request to the user - * This is only available for user accounts. + * This is only available when using a user account. * @returns {Promise} */ addFriend() { @@ -156,7 +156,7 @@ class User { /** * Removes the user from your friends - * This is only available for user accounts. + * This is only available when using a user account. * @returns {Promise} */ removeFriend() { @@ -165,7 +165,7 @@ class User { /** * Blocks the user - * This is only available for user accounts. + * This is only available when using a user account. * @returns {Promise} */ block() { @@ -174,7 +174,7 @@ class User { /** * Unblocks the user - * This is only available for user accounts. + * This is only available when using a user account. * @returns {Promise} */ unblock() { @@ -183,6 +183,7 @@ class User { /** * Get the profile of the user + * This is only available when using a user account. * @returns {Promise} */ fetchProfile() { @@ -191,7 +192,7 @@ class User { /** * Sets a note for the user - * This is only available for user accounts. + * This is only available when using a user account. * @param {string} note The note to set for the user * @returns {Promise} */ diff --git a/src/structures/interface/TextBasedChannel.js b/src/structures/interface/TextBasedChannel.js index 725ef5ef1..fba4442b1 100644 --- a/src/structures/interface/TextBasedChannel.js +++ b/src/structures/interface/TextBasedChannel.js @@ -119,7 +119,7 @@ class TextBasedChannel { /** * Gets a single message from this channel, regardless of it being cached or not. - * This is only available for bot accounts. + * This is only available when using a bot account. * @param {string} messageID The ID of the message to get * @returns {Promise} * @example @@ -302,7 +302,7 @@ class TextBasedChannel { /** * Bulk delete given messages. - * This is only available for bot accounts. + * This is only available when using a bot account. * @param {Collection|Message[]|number} messages Messages to delete, or number of messages to delete * @returns {Promise>} Deleted messages */