Docs cleanup

This commit is contained in:
iCrawl
2017-08-17 20:04:01 +02:00
parent 5ce0def9d0
commit 2aa2f73c74
40 changed files with 366 additions and 359 deletions

View File

@@ -129,12 +129,12 @@ exports.Endpoints = {
/**
* The current status of the client. Here are the available statuses:
* - READY
* - CONNECTING
* - RECONNECTING
* - IDLE
* - NEARLY
* - DISCONNECTED
* * READY
* * CONNECTING
* * RECONNECTING
* * IDLE
* * NEARLY
* * DISCONNECTED
* @typedef {number} Status
*/
exports.Status = {
@@ -148,11 +148,11 @@ exports.Status = {
/**
* The current status of a voice connection. Here are the available statuses:
* - CONNECTED
* - CONNECTING
* - AUTHENTICATING
* - RECONNECTING
* - DISCONNECTED
* * CONNECTED
* * CONNECTING
* * AUTHENTICATING
* * RECONNECTING
* * DISCONNECTED
* @typedef {number} VoiceStatus
*/
exports.VoiceStatus = {
@@ -243,41 +243,41 @@ exports.Events = {
/**
* The type of a websocket message event, e.g. `MESSAGE_CREATE`. Here are the available events:
* - READY
* - RESUMED
* - GUILD_SYNC
* - GUILD_CREATE
* - GUILD_DELETE
* - GUILD_UPDATE
* - GUILD_MEMBER_ADD
* - GUILD_MEMBER_REMOVE
* - GUILD_MEMBER_UPDATE
* - GUILD_MEMBERS_CHUNK
* - GUILD_ROLE_CREATE
* - GUILD_ROLE_DELETE
* - GUILD_ROLE_UPDATE
* - GUILD_BAN_ADD
* - GUILD_BAN_REMOVE
* - CHANNEL_CREATE
* - CHANNEL_DELETE
* - CHANNEL_UPDATE
* - CHANNEL_PINS_UPDATE
* - MESSAGE_CREATE
* - MESSAGE_DELETE
* - MESSAGE_UPDATE
* - MESSAGE_DELETE_BULK
* - MESSAGE_REACTION_ADD
* - MESSAGE_REACTION_REMOVE
* - MESSAGE_REACTION_REMOVE_ALL
* - USER_UPDATE
* - USER_NOTE_UPDATE
* - USER_SETTINGS_UPDATE
* - PRESENCE_UPDATE
* - VOICE_STATE_UPDATE
* - TYPING_START
* - VOICE_SERVER_UPDATE
* - RELATIONSHIP_ADD
* - RELATIONSHIP_REMOVE
* * READY
* * RESUMED
* * GUILD_SYNC
* * GUILD_CREATE
* * GUILD_DELETE
* * GUILD_UPDATE
* * GUILD_MEMBER_ADD
* * GUILD_MEMBER_REMOVE
* * GUILD_MEMBER_UPDATE
* * GUILD_MEMBERS_CHUNK
* * GUILD_ROLE_CREATE
* * GUILD_ROLE_DELETE
* * GUILD_ROLE_UPDATE
* * GUILD_BAN_ADD
* * GUILD_BAN_REMOVE
* * CHANNEL_CREATE
* * CHANNEL_DELETE
* * CHANNEL_UPDATE
* * CHANNEL_PINS_UPDATE
* * MESSAGE_CREATE
* * MESSAGE_DELETE
* * MESSAGE_UPDATE
* * MESSAGE_DELETE_BULK
* * MESSAGE_REACTION_ADD
* * MESSAGE_REACTION_REMOVE
* * MESSAGE_REACTION_REMOVE_ALL
* * USER_UPDATE
* * USER_NOTE_UPDATE
* * USER_SETTINGS_UPDATE
* * PRESENCE_UPDATE
* * VOICE_STATE_UPDATE
* * TYPING_START
* * VOICE_SERVER_UPDATE
* * RELATIONSHIP_ADD
* * RELATIONSHIP_REMOVE
* @typedef {string} WSEventType
*/
exports.WSEvents = {
@@ -322,14 +322,14 @@ exports.WSEvents = {
/**
* The type of a message, e.g. `DEFAULT`. Here are the available types:
* - DEFAULT
* - RECIPIENT_ADD
* - RECIPIENT_REMOVE
* - CALL
* - CHANNEL_NAME_CHANGE
* - CHANNEL_ICON_CHANGE
* - PINS_ADD
* - GUILD_MEMBER_JOIN
* * DEFAULT
* * RECIPIENT_ADD
* * RECIPIENT_REMOVE
* * CALL
* * CHANNEL_NAME_CHANGE
* * CHANNEL_ICON_CHANGE
* * PINS_ADD
* * GUILD_MEMBER_JOIN
* @typedef {string} MessageType
*/
exports.MessageTypes = [
@@ -345,10 +345,10 @@ exports.MessageTypes = [
/**
* The type of a game of a users presence, e.g. `PLAYING`. Here are the available types:
* - PLAYING
* - STREAMING
* - LISTENING
* - WATCHING
* * PLAYING
* * STREAMING
* * LISTENING
* * WATCHING
* @typedef {string} GameType
*/
exports.GameTypes = [
@@ -560,9 +560,9 @@ exports.UserChannelOverrideMap = {
/**
* All flags users can have:
* - STAFF
* - PARTNER
* - HYPESQUAD
* * STAFF
* * PARTNER
* * HYPESQUAD
* @typedef {string} UserFlags
*/
exports.UserFlags = {
@@ -606,49 +606,49 @@ exports.Colors = {
/**
* An error encountered while performing an API request. Here are the potential errors:
* - UNKNOWN_ACCOUNT
* - UNKNOWN_APPLICATION
* - UNKNOWN_CHANNEL
* - UNKNOWN_GUILD
* - UNKNOWN_INTEGRATION
* - UNKNOWN_INVITE
* - UNKNOWN_MEMBER
* - UNKNOWN_MESSAGE
* - UNKNOWN_OVERWRITE
* - UNKNOWN_PROVIDER
* - UNKNOWN_ROLE
* - UNKNOWN_TOKEN
* - UNKNOWN_USER
* - UNKNOWN_EMOJI
* - BOT_PROHIBITED_ENDPOINT
* - BOT_ONLY_ENDPOINT
* - MAXIMUM_GUILDS
* - MAXIMUM_FRIENDS
* - MAXIMUM_PINS
* - MAXIMUM_ROLES
* - MAXIMUM_REACTIONS
* - UNAUTHORIZED
* - MISSING_ACCESS
* - INVALID_ACCOUNT_TYPE
* - CANNOT_EXECUTE_ON_DM
* - EMBED_DISABLED
* - CANNOT_EDIT_MESSAGE_BY_OTHER
* - CANNOT_SEND_EMPTY_MESSAGE
* - CANNOT_MESSAGE_USER
* - CANNOT_SEND_MESSAGES_IN_VOICE_CHANNEL
* - CHANNEL_VERIFICATION_LEVEL_TOO_HIGH
* - OAUTH2_APPLICATION_BOT_ABSENT
* - MAXIMUM_OAUTH2_APPLICATIONS
* - INVALID_OAUTH_STATE
* - MISSING_PERMISSIONS
* - INVALID_AUTHENTICATION_TOKEN
* - NOTE_TOO_LONG
* - INVALID_BULK_DELETE_QUANTITY
* - CANNOT_PIN_MESSAGE_IN_OTHER_CHANNEL
* - CANNOT_EXECUTE_ON_SYSTEM_MESSAGE
* - BULK_DELETE_MESSAGE_TOO_OLD
* - INVITE_ACCEPTED_TO_GUILD_NOT_CONTANING_BOT
* - REACTION_BLOCKED
* * UNKNOWN_ACCOUNT
* * UNKNOWN_APPLICATION
* * UNKNOWN_CHANNEL
* * UNKNOWN_GUILD
* * UNKNOWN_INTEGRATION
* * UNKNOWN_INVITE
* * UNKNOWN_MEMBER
* * UNKNOWN_MESSAGE
* * UNKNOWN_OVERWRITE
* * UNKNOWN_PROVIDER
* * UNKNOWN_ROLE
* * UNKNOWN_TOKEN
* * UNKNOWN_USER
* * UNKNOWN_EMOJI
* * BOT_PROHIBITED_ENDPOINT
* * BOT_ONLY_ENDPOINT
* * MAXIMUM_GUILDS
* * MAXIMUM_FRIENDS
* * MAXIMUM_PINS
* * MAXIMUM_ROLES
* * MAXIMUM_REACTIONS
* * UNAUTHORIZED
* * MISSING_ACCESS
* * INVALID_ACCOUNT_TYPE
* * CANNOT_EXECUTE_ON_DM
* * EMBED_DISABLED
* * CANNOT_EDIT_MESSAGE_BY_OTHER
* * CANNOT_SEND_EMPTY_MESSAGE
* * CANNOT_MESSAGE_USER
* * CANNOT_SEND_MESSAGES_IN_VOICE_CHANNEL
* * CHANNEL_VERIFICATION_LEVEL_TOO_HIGH
* * OAUTH2_APPLICATION_BOT_ABSENT
* * MAXIMUM_OAUTH2_APPLICATIONS
* * INVALID_OAUTH_STATE
* * MISSING_PERMISSIONS
* * INVALID_AUTHENTICATION_TOKEN
* * NOTE_TOO_LONG
* * INVALID_BULK_DELETE_QUANTITY
* * CANNOT_PIN_MESSAGE_IN_OTHER_CHANNEL
* * CANNOT_EXECUTE_ON_SYSTEM_MESSAGE
* * BULK_DELETE_MESSAGE_TOO_OLD
* * INVITE_ACCEPTED_TO_GUILD_NOT_CONTANING_BOT
* * REACTION_BLOCKED
* @typedef {string} APIError
*/
exports.APIErrors = {

View File

@@ -69,7 +69,7 @@ class Permissions {
}
/**
* Gets an object mapping permission name (like `READ_MESSAGES`) to a {@link boolean} indicating whether the
* Gets an object mapping permission name (like `VIEW_CHANNEL`) to a {@link boolean} indicating whether the
* permission is available.
* @param {boolean} [checkAdmin=true] Whether to allow the administrator permission to override
* @returns {Object}
@@ -82,8 +82,8 @@ class Permissions {
/**
* Data that can be resolved to give a permission number. This can be:
* - A string (see {@link Permissions.FLAGS})
* - A permission number
* * A string (see {@link Permissions.FLAGS})
* * A permission number
* @typedef {string|number} PermissionResolvable
*/
@@ -102,34 +102,34 @@ class Permissions {
/**
* Numeric permission flags. All available properties:
* - `ADMINISTRATOR` (implicitly has *all* permissions, and bypasses all channel overwrites)
* - `CREATE_INSTANT_INVITE` (create invitations to the guild)
* - `KICK_MEMBERS`
* - `BAN_MEMBERS`
* - `MANAGE_CHANNELS` (edit and reorder channels)
* - `MANAGE_GUILD` (edit the guild information, region, etc.)
* - `ADD_REACTIONS` (add new reactions to messages)
* - `VIEW_AUDIT_LOG`
* - `VIEW_CHANNELS`
* - `SEND_MESSAGES`
* - `SEND_TTS_MESSAGES`
* - `MANAGE_MESSAGES` (delete messages and reactions)
* - `EMBED_LINKS` (links posted will have a preview embedded)
* - `ATTACH_FILES`
* - `READ_MESSAGE_HISTORY` (view messages that were posted prior to opening Discord)
* - `MENTION_EVERYONE`
* - `USE_EXTERNAL_EMOJIS` (use emojis from different guilds)
* - `CONNECT` (connect to a voice channel)
* - `SPEAK` (speak in a voice channel)
* - `MUTE_MEMBERS` (mute members across all voice channels)
* - `DEAFEN_MEMBERS` (deafen members across all voice channels)
* - `MOVE_MEMBERS` (move members between voice channels)
* - `USE_VAD` (use voice activity detection)
* - `CHANGE_NICKNAME`
* - `MANAGE_NICKNAMES` (change other members' nicknames)
* - `MANAGE_ROLES`
* - `MANAGE_WEBHOOKS`
* - `MANAGE_EMOJIS`
* * `ADMINISTRATOR` (implicitly has *all* permissions, and bypasses all channel overwrites)
* * `CREATE_INSTANT_INVITE` (create invitations to the guild)
* * `KICK_MEMBERS`
* * `BAN_MEMBERS`
* * `MANAGE_CHANNELS` (edit and reorder channels)
* * `MANAGE_GUILD` (edit the guild information, region, etc.)
* * `ADD_REACTIONS` (add new reactions to messages)
* * `VIEW_AUDIT_LOG`
* * `VIEW_CHANNEL`
* * `SEND_MESSAGES`
* * `SEND_TTS_MESSAGES`
* * `MANAGE_MESSAGES` (delete messages and reactions)
* * `EMBED_LINKS` (links posted will have a preview embedded)
* * `ATTACH_FILES`
* * `READ_MESSAGE_HISTORY` (view messages that were posted prior to opening Discord)
* * `MENTION_EVERYONE`
* * `USE_EXTERNAL_EMOJIS` (use emojis from different guilds)
* * `CONNECT` (connect to a voice channel)
* * `SPEAK` (speak in a voice channel)
* * `MUTE_MEMBERS` (mute members across all voice channels)
* * `DEAFEN_MEMBERS` (deafen members across all voice channels)
* * `MOVE_MEMBERS` (move members between voice channels)
* * `USE_VAD` (use voice activity detection)
* * `CHANGE_NICKNAME`
* * `MANAGE_NICKNAMES` (change other members' nicknames)
* * `MANAGE_ROLES`
* * `MANAGE_WEBHOOKS`
* * `MANAGE_EMOJIS`
* @type {Object}
* @see {@link https://discordapp.com/developers/docs/topics/permissions}
*/

View File

@@ -70,9 +70,9 @@ class Util {
/**
* Parses emoji info out of a string. The string must be one of:
* - A UTF-8 emoji (no ID)
* - A URL-encoded UTF-8 emoji (no ID)
* - A Discord custom emoji (`<:name:id>`)
* * A UTF-8 emoji (no ID)
* * A URL-encoded UTF-8 emoji (no ID)
* * A Discord custom emoji (`<:name:id>`)
* @param {string} text Emoji string to parse
* @returns {Object} Object with `name` and `id` properties
* @private