mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
cleanup: Error messages cleanup (#3079)
Removed keys that return zero occurrences in the library's source code
This commit is contained in:
@@ -15,12 +15,8 @@ const Messages = {
|
||||
|
||||
BITFIELD_INVALID: 'Invalid bitfield flag or number.',
|
||||
|
||||
RATELIMIT_INVALID_METHOD: 'Unknown rate limiting method.',
|
||||
|
||||
SHARDING_INVALID: 'Invalid shard settings were provided.',
|
||||
SHARDING_REQUIRED: 'This session would have handled too many guilds - Sharding is required.',
|
||||
SHARDING_CHILD_CONNECTION: 'Failed to send message to shard\'s process.',
|
||||
SHARDING_PARENT_CONNECTION: 'Failed to send message to master process.',
|
||||
SHARDING_NO_SHARDS: 'No shards have been spawned.',
|
||||
SHARDING_IN_PROCESS: 'Shards are still being spawned.',
|
||||
SHARDING_ALREADY_SPAWNED: count => `Already spawned ${count} shards.`,
|
||||
@@ -41,7 +37,6 @@ const Messages = {
|
||||
|
||||
VOICE_INVALID_HEARTBEAT: 'Tried to set voice heartbeat but no valid interval was specified.',
|
||||
VOICE_USER_MISSING: 'Couldn\'t resolve the user to create stream.',
|
||||
VOICE_STREAM_EXISTS: 'There is already an existing stream for that user.',
|
||||
VOICE_JOIN_CHANNEL: (full = false) =>
|
||||
`You do not have permission to join this voice channel${full ? '; it is full.' : '.'}`,
|
||||
VOICE_CONNECTION_TIMEOUT: 'Connection not established within 15 seconds.',
|
||||
@@ -57,19 +52,15 @@ const Messages = {
|
||||
|
||||
VOICE_STATE_UNCACHED_MEMBER: 'The member of this voice state is uncached.',
|
||||
|
||||
OPUS_ENGINE_MISSING: 'Couldn\'t find an Opus engine.',
|
||||
|
||||
UDP_SEND_FAIL: 'Tried to send a UDP packet, but there is no socket available.',
|
||||
UDP_ADDRESS_MALFORMED: 'Malformed UDP address or port.',
|
||||
UDP_CONNECTION_EXISTS: 'There is already an existing UDP connection.',
|
||||
|
||||
REQ_BODY_TYPE: 'The response body isn\'t a Buffer.',
|
||||
REQ_RESOURCE_TYPE: 'The resource must be a string, Buffer or a valid file stream.',
|
||||
|
||||
IMAGE_FORMAT: format => `Invalid image format: ${format}`,
|
||||
IMAGE_SIZE: size => `Invalid image size: ${size}`,
|
||||
|
||||
MESSAGE_MISSING: 'Message not found',
|
||||
MESSAGE_BULK_DELETE_TYPE: 'The messages must be an Array, Collection, or number.',
|
||||
MESSAGE_NONCE_TYPE: 'Message nonce must fit in an unsigned 64-bit integer.',
|
||||
|
||||
@@ -85,7 +76,6 @@ const Messages = {
|
||||
GUILD_VOICE_CHANNEL_RESOLVE: 'Could not resolve channel to a guild voice channel.',
|
||||
GUILD_CHANNEL_ORPHAN: 'Could not find a parent to this guild channel.',
|
||||
GUILD_OWNED: 'Guild is owned by the client.',
|
||||
GUILD_RESTRICTED: (state = false) => `Guild is ${state ? 'already' : 'not'} restricted.`,
|
||||
GUILD_MEMBERS_TIMEOUT: 'Members didn\'t arrive in time.',
|
||||
|
||||
INVALID_TYPE: (name, expected, an = false) => `Supplied ${name} is not a${an ? 'n' : ''} ${expected}.`,
|
||||
|
||||
Reference in New Issue
Block a user