Make bot/user account notices consistent

This commit is contained in:
Schuyler Cebulskie
2016-10-30 16:41:39 -04:00
parent 5fa9e3548b
commit 589c44327a
5 changed files with 17 additions and 13 deletions

View File

@@ -109,7 +109,7 @@ class Client extends EventEmitter {
/**
* A Collection of presences for friends of the logged in user.
* <warn>This is only present for user accounts, not bot accounts!</warn>
* <warn>This is only filled for user accounts, not bot accounts.</warn>
* @type {Collection<string, Presence>}
*/
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.
* <warn>This is only applicable to user accounts.</warn>
* @param {Guild[]|Collection<string, Guild>} [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.
* <warn>This is only available to bot accounts.</warn>
* @param {string} id The ID of the user to obtain
* @returns {Promise<User>}
*/
@@ -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.
* <warn>This is only available for bot accounts.</warn>
* @returns {Promise<ClientOAuth2App>}
*/
getMyApp() {

View File

@@ -25,14 +25,14 @@ class ClientUser extends User {
/**
* A Collection of friends for the logged in user.
* <warn>This is only filled for user accounts, not bot accounts!</warn>
* <warn>This is only filled for user accounts, not bot accounts.</warn>
* @type {Collection<string, User>}
*/
this.friends = new Collection();
/**
* A Collection of blocked users for the logged in user.
* <warn>This is only filled for user accounts, not bot accounts!</warn>
* <warn>This is only filled for user accounts, not bot accounts.</warn>
* @type {Collection<string, User>}
*/
this.blocked = new Collection();
@@ -141,7 +141,7 @@ class ClientUser extends User {
/**
* Send a friend request
* <warn>This is only available for user accounts, not bot accounts!</warn>
* <warn>This is only available for user accounts, not bot accounts.</warn>
* @param {UserResolvable} user The user to send the friend request to.
* @returns {Promise<User>} The user the friend request was sent to.
*/
@@ -152,7 +152,7 @@ class ClientUser extends User {
/**
* Remove a friend
* <warn>This is only available for user accounts, not bot accounts!</warn>
* <warn>This is only available for user accounts, not bot accounts.</warn>
* @param {UserResolvable} user The user to remove from your friends
* @returns {Promise<User>} The user that was removed
*/
@@ -163,7 +163,7 @@ class ClientUser extends User {
/**
* Creates a guild
* <warn>This is only available for user accounts, not bot accounts!</warn>
* <warn>This is only available for user accounts, not bot accounts.</warn>
* @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

View File

@@ -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).
* <warn>This is only applicable to user accounts.</warn>
*/
sync() {
if (!this.client.user.bot) this.client.syncGuilds([this]);

View File

@@ -119,7 +119,7 @@ class TextBasedChannel {
/**
* Gets a single message from this channel, regardless of it being cached or not.
* <warn>Only OAuth bot accounts can use this method.</warn>
* <warn>This is only available for bot accounts.</warn>
* @param {string} messageID The ID of the message to get
* @returns {Promise<Message>}
* @example
@@ -302,7 +302,7 @@ class TextBasedChannel {
/**
* Bulk delete given messages.
* Only OAuth Bot accounts may use this method.
* <warn>This is only available for bot accounts.</warn>
* @param {Collection<string, Message>|Message[]|number} messages Messages to delete, or number of messages to delete
* @returns {Promise<Collection<string, Message>>} Deleted messages
*/

View File

@@ -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.',