feat(Constants): backport VerificationLevels and missing APIError codes (#3688)

* Add VerificationLevel constants

* Update APIError constants
This commit is contained in:
Ryan Munro
2020-01-14 06:47:56 +11:00
committed by SpaceEEC
parent 684bb1bf36
commit 07996d12a2

View File

@@ -747,6 +747,23 @@ exports.Colors = {
NOT_QUITE_BLACK: 0x23272A,
};
/**
* The value set for the verification levels for a guild:
* * None
* * Low
* * Medium
* * (╯°□°)╯︵ ┻━┻
* * ┻━┻ ミヽ(ಠ益ಠ)ノ彡┻━┻
* @typedef {string} VerificationLevel
*/
exports.VerificationLevels = [
'None',
'Low',
'Medium',
'(╯°□°)╯︵ ┻━┻',
'┻━┻ ミヽ(ಠ益ಠ)ノ彡┻━┻',
];
/**
* An error encountered while performing an API request. Here are the potential errors:
* * UNKNOWN_ACCOUNT
@@ -771,7 +788,10 @@ exports.Colors = {
* * MAXIMUM_PINS
* * MAXIMUM_ROLES
* * MAXIMUM_REACTIONS
* * MAXIMUM_CHANNELS
* * MAXIMUM_INVITES
* * UNAUTHORIZED
* * USER_BANNED
* * MISSING_ACCESS
* * INVALID_ACCOUNT_TYPE
* * CANNOT_EXECUTE_ON_DM
@@ -791,9 +811,13 @@ exports.Colors = {
* * CANNOT_PIN_MESSAGE_IN_OTHER_CHANNEL
* * INVALID_OR_TAKEN_INVITE_CODE
* * CANNOT_EXECUTE_ON_SYSTEM_MESSAGE
* * INVALID_OAUTH_TOKEN
* * BULK_DELETE_MESSAGE_TOO_OLD
* * INVITE_ACCEPTED_TO_GUILD_NOT_CONTANING_BOT
* * INVALID_FORM_BODY
* * INVITE_ACCEPTED_TO_GUILD_NOT_CONTAINING_BOT
* * INVALID_API_VERSION
* * REACTION_BLOCKED
* * RESOURCE_OVERLOADED
* @typedef {string} APIError
*/
exports.APIErrors = {
@@ -819,7 +843,10 @@ exports.APIErrors = {
MAXIMUM_PINS: 30003,
MAXIMUM_ROLES: 30005,
MAXIMUM_REACTIONS: 30010,
MAXIMUM_CHANNELS: 30013,
MAXIMUM_INVITES: 30016,
UNAUTHORIZED: 40001,
USER_BANNED: 40007,
MISSING_ACCESS: 50001,
INVALID_ACCOUNT_TYPE: 50002,
CANNOT_EXECUTE_ON_DM: 50003,
@@ -839,9 +866,13 @@ exports.APIErrors = {
CANNOT_PIN_MESSAGE_IN_OTHER_CHANNEL: 50019,
INVALID_OR_TAKEN_INVITE_CODE: 50020,
CANNOT_EXECUTE_ON_SYSTEM_MESSAGE: 50021,
INVALID_OAUTH_TOKEN: 50025,
BULK_DELETE_MESSAGE_TOO_OLD: 50034,
INVITE_ACCEPTED_TO_GUILD_NOT_CONTANING_BOT: 50036,
INVALID_FORM_BODY: 50035,
INVITE_ACCEPTED_TO_GUILD_NOT_CONTAINING_BOT: 50036,
INVALID_API_VERSION: 50041,
REACTION_BLOCKED: 90001,
RESOURCE_OVERLOADED: 130000,
};
/**