From 589c44327a3a61444bb0908e3f2deec87c4deb03 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Sun, 30 Oct 2016 16:41:39 -0400 Subject: [PATCH] Make bot/user account notices consistent --- src/client/Client.js | 10 ++++++---- src/structures/ClientUser.js | 10 +++++----- src/structures/Guild.js | 3 ++- src/structures/interface/TextBasedChannel.js | 4 ++-- src/util/Constants.js | 3 ++- 5 files changed, 17 insertions(+), 13 deletions(-) diff --git a/src/client/Client.js b/src/client/Client.js index baf444ddb..c1b088c36 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 present for user accounts, not bot accounts! + * This is only filled for user accounts, not bot accounts. * @type {Collection} */ this.presences = new Collection(); @@ -246,7 +246,8 @@ 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. Only applicable to user accounts. + * if you wish to force a sync of Guild data, you can use this. + * This is only applicable to user accounts. * @param {Guild[]|Collection} [guilds=this.guilds] An array or collection of guilds to sync */ syncGuilds(guilds = this.guilds) { @@ -260,7 +261,7 @@ class Client extends EventEmitter { /** * Caches a user, or obtains it from the cache if it's already cached. - * If the user isn't already cached, it will only be obtainable by OAuth bot accounts. + * This is only available to bot accounts. * @param {string} id The ID of the user to obtain * @returns {Promise} */ @@ -326,7 +327,8 @@ class Client extends EventEmitter { } /** - * Get's the bot's OAuth2 app. Only usable by bot accounts + * Get's the bot's OAuth2 app. + * This is only available for bot accounts. * @returns {Promise} */ getMyApp() { diff --git a/src/structures/ClientUser.js b/src/structures/ClientUser.js index 69f37e5b9..1a2e6466b 100644 --- a/src/structures/ClientUser.js +++ b/src/structures/ClientUser.js @@ -25,14 +25,14 @@ 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 for user accounts, not bot accounts. * @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 for user accounts, not bot accounts. * @type {Collection} */ this.blocked = new Collection(); @@ -141,7 +141,7 @@ class ClientUser extends User { /** * Send a friend request - * This is only available for user accounts, not bot accounts! + * This is only available for user accounts, not bot accounts. * @param {UserResolvable} user The user to send the friend request to. * @returns {Promise} The user the friend request was sent to. */ @@ -152,7 +152,7 @@ class ClientUser extends User { /** * Remove a friend - * This is only available for user accounts, not bot accounts! + * This is only available for user accounts, not bot accounts. * @param {UserResolvable} user The user to remove from your friends * @returns {Promise} The user that was removed */ @@ -163,7 +163,7 @@ class ClientUser extends User { /** * Creates a guild - * This is only available for user accounts, not bot accounts! + * This is only available for user accounts, not bot accounts. * @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 1aa99d53a..5521bbcbd 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -538,7 +538,8 @@ class Guild { } /** - * Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts. + * Syncs this guild (already done automatically every 30 seconds). + * This is only applicable to user accounts. */ sync() { if (!this.client.user.bot) this.client.syncGuilds([this]); diff --git a/src/structures/interface/TextBasedChannel.js b/src/structures/interface/TextBasedChannel.js index 35ba29ba5..fd7684232 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. - * Only OAuth bot accounts can use this method. + * This is only available for bot accounts. * @param {string} messageID The ID of the message to get * @returns {Promise} * @example @@ -302,7 +302,7 @@ class TextBasedChannel { /** * Bulk delete given messages. - * Only OAuth Bot accounts may use this method. + * This is only available for bot accounts. * @param {Collection|Message[]|number} messages Messages to delete, or number of messages to delete * @returns {Promise>} Deleted messages */ diff --git a/src/util/Constants.js b/src/util/Constants.js index 8ce939b21..d8015a73e 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -58,7 +58,8 @@ exports.DefaultOptions = { exports.Errors = { NO_TOKEN: 'Request to use token, but token was unavailable to the client.', - NO_BOT_ACCOUNT: 'You have to use a bot account to use this method.', + NO_BOT_ACCOUNT: 'Only bot accounts are able to make use of this feature.', + NO_USER_ACCOUNT: 'Only user accounts are able to make use of this feature.', BAD_WS_MESSAGE: 'A bad message was received from the websocket; either bad compression, or not JSON.', TOOK_TOO_LONG: 'Something took too long to do.', NOT_A_PERMISSION: 'Invalid permission string or number.',