/*
 * Copyright (C) 2026 Fluxer Contributors
 *
 * This file is part of Fluxer.
 *
 * Fluxer is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Fluxer is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with Fluxer. If not, see <https://www.gnu.org/licenses/>.
 */

import type {APIErrorCode} from '@fluxer/constants/src/ApiErrorCodes';
import {APIErrorCodes} from '@fluxer/constants/src/ApiErrorCodes';
import type {ValidationErrorCode} from '@fluxer/constants/src/ValidationErrorCodes';
import {ValidationErrorCodes} from '@fluxer/constants/src/ValidationErrorCodes';
import type {ErrorI18nKey} from '@fluxer/errors/src/i18n/ErrorI18nTypes.generated';

type AllErrorCodes = APIErrorCode | ValidationErrorCode;

export const ErrorCodeToI18nKey = {
	[APIErrorCodes.ACCESS_DENIED]: 'permissions.missing_access',
	[APIErrorCodes.ACCOUNT_DISABLED]: 'account.disabled',
	[APIErrorCodes.ACCOUNT_SCHEDULED_FOR_DELETION]: 'account.scheduled_for_deletion',
	[APIErrorCodes.ACCOUNT_SUSPENDED_PERMANENTLY]: 'account.suspended_permanently',
	[APIErrorCodes.ACCOUNT_SUSPENDED_TEMPORARILY]: 'account.suspended_temporarily',
	[APIErrorCodes.ACCOUNT_SUSPICIOUS_ACTIVITY]: 'account.locked_suspicious_activity',
	[APIErrorCodes.ACCOUNT_TOO_NEW_FOR_GUILD]: 'account.too_new_for_guild',
	[APIErrorCodes.ACLS_MUST_BE_NON_EMPTY]: 'admin_and_system.acls_must_be_non_empty',
	[APIErrorCodes.ADMIN_API_KEY_NOT_FOUND]: 'admin_and_system.admin_api_key_not_found',
	[APIErrorCodes.APPLICATION_NOT_FOUND]: 'unknown_entities.unknown_application',
	[APIErrorCodes.APPLICATION_NOT_OWNED]: 'auth_and_oauth.application_not_owned',
	[APIErrorCodes.ALREADY_FRIENDS]: 'friends_and_dms.already_friends',
	[APIErrorCodes.AUDIT_LOG_INDEXING]: 'admin_and_system.audit_log_indexing',
	[APIErrorCodes.BOTS_CANNOT_SEND_FRIEND_REQUESTS]: 'friends_and_dms.bots_cannot_send_friend_requests',
	[APIErrorCodes.BAD_GATEWAY]: 'http.bad_gateway',
	[APIErrorCodes.BAD_REQUEST]: 'http.bad_request',
	[APIErrorCodes.BLUESKY_OAUTH_AUTHORIZATION_FAILED]: 'connections.bluesky_oauth_authorization_failed',
	[APIErrorCodes.BLUESKY_OAUTH_CALLBACK_FAILED]: 'connections.bluesky_oauth_callback_failed',
	[APIErrorCodes.BLUESKY_OAUTH_NOT_ENABLED]: 'connections.bluesky_oauth_not_enabled',
	[APIErrorCodes.BLUESKY_OAUTH_SESSION_EXPIRED]: 'connections.bluesky_oauth_session_expired',
	[APIErrorCodes.BLUESKY_OAUTH_STATE_INVALID]: 'connections.bluesky_oauth_state_invalid',
	[APIErrorCodes.BOT_ALREADY_IN_GUILD]: 'auth_and_oauth.bot_already_in_guild',
	[APIErrorCodes.BOT_APPLICATION_NOT_FOUND]: 'bots.bot_application_not_found',
	[APIErrorCodes.BOT_IS_PRIVATE]: 'bots.bot_is_private',
	[APIErrorCodes.BOT_USER_AUTH_ENDPOINT_ACCESS_DENIED]: 'auth_and_oauth.bot_users_cannot_use_auth_endpoints',
	[APIErrorCodes.BOT_USER_AUTH_SESSION_CREATION_DENIED]: 'auth_and_oauth.bot_users_cannot_create_auth_sessions',
	[APIErrorCodes.BOT_USER_GENERATION_FAILED]: 'bots.bot_user_generation_failed',
	[APIErrorCodes.BOT_USER_NOT_FOUND]: 'bots.bot_user_not_found',
	[APIErrorCodes.CALL_ALREADY_EXISTS]: 'calls_and_voice.call_already_exists',
	[APIErrorCodes.CANNOT_EDIT_OTHER_USER_MESSAGE]: 'messages.cannot_edit_others_message',
	[APIErrorCodes.CANNOT_EXECUTE_ON_DM]: 'channels_and_guilds.cannot_execute_on_dm',
	[APIErrorCodes.CANNOT_MODIFY_SYSTEM_WEBHOOK]: 'webhooks.cannot_modify_system_webhook',
	[APIErrorCodes.CANNOT_MODIFY_VOICE_STATE]: 'calls_and_voice.cannot_modify_voice_state',
	[APIErrorCodes.CANNOT_REDEEM_PLUTONIUM_WITH_VISIONARY]: 'premium_and_plans.cannot_redeem_plutonium_with_visionary',
	[ValidationErrorCodes.ANIMATED_AVATARS_REQUIRE_PREMIUM]: 'premium_and_plans.animated_avatars_require_premium',
	[ValidationErrorCodes.BANNERS_REQUIRE_PREMIUM]: 'premium_and_plans.banners_require_premium',
	[ValidationErrorCodes.CANNOT_EDIT_ATTACHMENT_METADATA]: 'attachments_and_uploads.cannot_edit_attachment_metadata',
	[ValidationErrorCodes.CANNOT_LEAVE_GUILD_AS_OWNER]: 'channels_and_guilds.cannot_leave_guild_as_owner',
	[ValidationErrorCodes.CANNOT_REORDER_EVERYONE_ROLE]: 'roles.cannot_reorder_everyone_role',
	[APIErrorCodes.CANNOT_REPORT_OWN_GUILD]: 'channels_and_guilds.cannot_report_own_guild',
	[APIErrorCodes.CANNOT_REPORT_OWN_MESSAGE]: 'moderation_and_reports.cannot_report_own_message',
	[APIErrorCodes.CANNOT_REPORT_YOURSELF]: 'moderation_and_reports.cannot_report_yourself',
	[APIErrorCodes.CANNOT_SEND_EMPTY_MESSAGE]: 'messages.cannot_send_empty_message',
	[APIErrorCodes.CANNOT_SEND_FRIEND_REQUEST_TO_BLOCKED_USER]:
		'friends_and_dms.cannot_send_friend_request_to_blocked_user',
	[APIErrorCodes.CANNOT_SEND_FRIEND_REQUEST_TO_SELF]: 'friends_and_dms.cannot_send_friend_request_to_self',
	[APIErrorCodes.CANNOT_SEND_MESSAGES_IN_NON_TEXT_CHANNEL]: 'misc.cannot_send_messages_in_non_text_channel',
	[APIErrorCodes.CANNOT_SEND_MESSAGES_TO_USER]: 'friends_and_dms.cannot_send_messages_to_user',
	[APIErrorCodes.CANNOT_TRANSFER_OWNERSHIP_TO_BOT]: 'channels_and_guilds.cannot_transfer_ownership_to_bot',
	[APIErrorCodes.CANNOT_SHRINK_RESERVED_SLOTS]: 'limits.cannot_shrink_reserved_slots',
	[APIErrorCodes.CAPTCHA_REQUIRED]: 'captcha.required',
	[APIErrorCodes.CHANNEL_INDEXING]: 'admin_and_system.channel_indexing',
	[APIErrorCodes.COMMUNICATION_DISABLED]: 'account.communication_disabled',
	[APIErrorCodes.CONNECTION_ALREADY_EXISTS]: 'connections.already_exists',
	[APIErrorCodes.CONNECTION_INITIATION_TOKEN_INVALID]: 'connections.initiation_token_invalid',
	[APIErrorCodes.CONNECTION_INVALID_IDENTIFIER]: 'connections.invalid_identifier',
	[APIErrorCodes.CONNECTION_INVALID_TYPE]: 'connections.invalid_type',
	[APIErrorCodes.CONNECTION_LIMIT_REACHED]: 'connections.limit_reached',
	[APIErrorCodes.CONNECTION_NOT_FOUND]: 'connections.not_found',
	[APIErrorCodes.CONNECTION_VERIFICATION_FAILED]: 'connections.verification_failed',
	[APIErrorCodes.CONFLICT]: 'http.conflict',
	[APIErrorCodes.CONTENT_BLOCKED]: 'content_and_safety.content_blocked',
	[APIErrorCodes.CREATION_FAILED]: 'admin_and_system.creation_failed',
	[APIErrorCodes.CSAM_SCAN_FAILED]: 'content_and_safety.csam_scan_failed',
	[APIErrorCodes.CSAM_SCAN_PARSE_ERROR]: 'content_and_safety.csam_scan_parse_error',
	[APIErrorCodes.CSAM_SCAN_SUBSCRIPTION_ERROR]: 'content_and_safety.csam_scan_subscription_error',
	[APIErrorCodes.CSAM_SCAN_TIMEOUT]: 'content_and_safety.csam_scan_timeout',
	[APIErrorCodes.DECRYPTION_FAILED]: 'admin_and_system.decryption_failed',
	[APIErrorCodes.DELETION_FAILED]: 'admin_and_system.deletion_failed',
	[APIErrorCodes.DISCOVERY_ALREADY_APPLIED]: 'discovery.already_applied',
	[APIErrorCodes.DISCOVERY_APPLICATION_ALREADY_REVIEWED]: 'discovery.application_already_reviewed',
	[APIErrorCodes.DISCOVERY_APPLICATION_NOT_FOUND]: 'discovery.application_not_found',
	[APIErrorCodes.DISCOVERY_DESCRIPTION_REQUIRED]: 'discovery.description_required',
	[APIErrorCodes.DISCOVERY_DISABLED]: 'discovery.disabled',
	[APIErrorCodes.DISCOVERY_INSUFFICIENT_MEMBERS]: 'discovery.insufficient_members',
	[APIErrorCodes.DISCOVERY_INVALID_CATEGORY]: 'discovery.invalid_category',
	[APIErrorCodes.DISCOVERY_NOT_DISCOVERABLE]: 'discovery.not_discoverable',
	[APIErrorCodes.DISCRIMINATOR_REQUIRED]: 'usernames_and_tags.discriminator_required',
	[APIErrorCodes.EMAIL_SERVICE_NOT_TESTABLE]: 'email.email_service_not_testable',
	[APIErrorCodes.EMAIL_VERIFICATION_REQUIRED]: 'account.email_verification_required_for_guild',
	[APIErrorCodes.EMPTY_ENCRYPTED_BODY]: 'admin_and_system.empty_encrypted_body',
	[APIErrorCodes.ENCRYPTION_FAILED]: 'admin_and_system.encryption_failed',
	[APIErrorCodes.EXPLICIT_CONTENT_CANNOT_BE_SENT]: 'content_and_safety.explicit_content_cannot_be_sent',
	[APIErrorCodes.FEATURE_NOT_AVAILABLE_SELF_HOSTED]: 'feature_flags.feature_not_available_self_hosted',
	[APIErrorCodes.FEATURE_TEMPORARILY_DISABLED]: 'feature_flags.feature_temporarily_disabled',
	[APIErrorCodes.FILE_SIZE_TOO_LARGE]: 'attachments_and_uploads.file_size_too_large',
	[APIErrorCodes.MESSAGE_TOTAL_ATTACHMENT_SIZE_TOO_LARGE]: 'attachments_and_uploads.file_size_too_large',
	[APIErrorCodes.FORBIDDEN]: 'http.forbidden',
	[ValidationErrorCodes.ATTACHMENT_METADATA_WITHOUT_FILES]: 'attachments_and_uploads.attachment_metadata_without_files',
	[ValidationErrorCodes.ATTACHMENT_ID_NOT_FOUND_IN_MESSAGE]: 'attachments_and_uploads.attachment_not_found_in_message',
	[ValidationErrorCodes.ATTACHMENT_MUST_BE_IMAGE]: 'attachments_and_uploads.attachment_must_be_image',
	[ValidationErrorCodes.INVALID_IMAGE_FORMAT]: 'attachments_and_uploads.invalid_image_format',
	[ValidationErrorCodes.REFERENCED_ATTACHMENT_NOT_FOUND]: 'attachments_and_uploads.referenced_attachment_not_found',
	[APIErrorCodes.FRIEND_REQUEST_BLOCKED]: 'friends_and_dms.friend_request_blocked',
	[APIErrorCodes.GATEWAY_TIMEOUT]: 'http.gateway_timeout',
	[APIErrorCodes.GENERAL_ERROR]: 'admin_and_system.general_error',
	[APIErrorCodes.GIFT_CODE_ALREADY_REDEEMED]: 'invites_and_gifts.gift_code_already_redeemed',
	[APIErrorCodes.GONE]: 'http.gone',
	[APIErrorCodes.GUILD_PHONE_VERIFICATION_REQUIRED]: 'account.phone_required_for_guild',
	[APIErrorCodes.GUILD_VERIFICATION_REQUIRED]: 'account.guild_verification_required',
	[APIErrorCodes.HANDOFF_CODE_EXPIRED]: 'auth_and_oauth.handoff_code_expired',
	[APIErrorCodes.HARVEST_EXPIRED]: 'harvest.expired',
	[APIErrorCodes.HARVEST_FAILED]: 'harvest.failed',
	[APIErrorCodes.HARVEST_NOT_READY]: 'harvest.not_ready',
	[APIErrorCodes.HARVEST_ON_COOLDOWN]: 'harvest.on_cooldown',
	[APIErrorCodes.HTTP_GET_AUTHORIZE_NOT_SUPPORTED]: 'auth_and_oauth.http_get_authorize_not_supported',
	[APIErrorCodes.INSTANCE_VERSION_MISMATCH]: 'misc.invalid_request_generic',
	[APIErrorCodes.INTERNAL_SERVER_ERROR]: 'http.internal_server_error',
	[APIErrorCodes.INVALID_ACLS_FORMAT]: 'admin_and_system.invalid_acls_format',
	[APIErrorCodes.INVALID_API_ORIGIN]: 'admin_and_system.invalid_api_origin',
	[APIErrorCodes.INVALID_AUTH_TOKEN]: 'auth_and_oauth.invalid_or_expired_authorization_token',
	[APIErrorCodes.INVALID_BOT_FLAG]: 'admin_and_system.invalid_bot_flag',
	[APIErrorCodes.INVALID_CAPTCHA]: 'captcha.invalid',
	[APIErrorCodes.INVALID_CHANNEL_TYPE_FOR_CALL]: 'channels_and_guilds.invalid_channel_type_for_call',
	[APIErrorCodes.INVALID_CHANNEL_TYPE]: 'channels_and_guilds.invalid_channel_type',
	[ValidationErrorCodes.CHANNEL_NOT_FOUND]: 'channels_and_guilds.channel_not_found',
	[APIErrorCodes.INVALID_CLIENT]: 'auth_and_oauth.invalid_client',
	[APIErrorCodes.INVALID_CLIENT_SECRET]: 'auth_and_oauth.invalid_client_secret',
	[APIErrorCodes.INVALID_DSA_REPORT_TARGET]: 'moderation_and_reports.invalid_dsa_report_target',
	[APIErrorCodes.INVALID_DSA_TICKET]: 'moderation_and_reports.invalid_dsa_ticket',
	[APIErrorCodes.INVALID_DSA_VERIFICATION_CODE]: 'moderation_and_reports.invalid_dsa_verification_code',
	[APIErrorCodes.INVALID_DECRYPTED_JSON]: 'admin_and_system.invalid_decrypted_json',
	[APIErrorCodes.INVALID_EPHEMERAL_KEY]: 'admin_and_system.invalid_ephemeral_key',
	[APIErrorCodes.INVALID_FLAGS_FORMAT]: 'admin_and_system.invalid_flags_format',
	[APIErrorCodes.INVALID_IV]: 'admin_and_system.invalid_iv',
	[APIErrorCodes.INVALID_FORM_BODY]: 'admin_and_system.invalid_form_body',
	[ValidationErrorCodes.INVALID_FORMAT]: 'admin_and_system.invalid_format',
	[ValidationErrorCodes.INVALID_BASE64_FORMAT]: 'admin_and_system.invalid_format',
	[ValidationErrorCodes.INVALID_EMAIL_FORMAT]: 'email.invalid_format',
	[ValidationErrorCodes.INVALID_EMAIL_LOCAL_PART]: 'email.invalid_format',
	[APIErrorCodes.INVALID_GRANT]: 'auth_and_oauth.invalid_grant',
	[APIErrorCodes.INVALID_HANDOFF_CODE]: 'auth_and_oauth.handoff_code_invalid',
	[ValidationErrorCodes.INVALID_OR_EXPIRED_AUTHORIZATION_TICKET]:
		'auth_and_oauth.invalid_or_expired_authorization_ticket',
	[APIErrorCodes.INVALID_PACK_TYPE]: 'invites_and_packs.invalid_pack_type',
	[APIErrorCodes.INVALID_PERMISSIONS_INTEGER]: 'misc.invalid_permissions_integer',
	[APIErrorCodes.INVALID_PERMISSIONS_NEGATIVE]: 'misc.invalid_permissions_negative',
	[APIErrorCodes.INVALID_PHONE_NUMBER]: 'phone.invalid_number',
	[APIErrorCodes.INVALID_PHONE_VERIFICATION_CODE]: 'phone.verification_code_invalid',
	[ValidationErrorCodes.INVALID_PASSWORD]: 'email.invalid_or_password',
	[ValidationErrorCodes.INVALID_MFA_CODE]: 'mfa_and_passkeys.invalid_mfa_code',
	[APIErrorCodes.INVALID_REDIRECT_URI]: 'auth_and_oauth.invalid_redirect_uri',
	[APIErrorCodes.INVALID_REQUEST]: 'misc.invalid_request_generic',
	[ValidationErrorCodes.STRING_LENGTH_INVALID]: 'limits.string_length_invalid',
	[ValidationErrorCodes.BASE64_LENGTH_INVALID]: 'limits.base64_length_invalid',
	[ValidationErrorCodes.CONTENT_EXCEEDS_MAX_LENGTH]: 'limits.content_exceeds_max_length',
	[ValidationErrorCodes.PASSWORD_LENGTH_INVALID]: 'limits.string_length_invalid',
	[ValidationErrorCodes.INVALID_ROLE_ID]: 'roles.invalid_role_id',
	[ValidationErrorCodes.COLOR_VALUE_TOO_HIGH]: 'colors.color_value_too_high',
	[ValidationErrorCodes.COLOR_VALUE_TOO_LOW]: 'colors.color_value_too_low',
	[ValidationErrorCodes.GUILD_ID_MUST_MATCH_REFERENCED_MESSAGE]:
		'channels_and_guilds.guild_id_must_match_referenced_message',
	[ValidationErrorCodes.EMBED_INDEX_OUT_OF_BOUNDS]: 'embeds.embed_index_out_of_bounds',
	[ValidationErrorCodes.EMBEDS_EXCEED_MAX_CHARACTERS]: 'embeds.embeds_exceed_max_characters',
	[ValidationErrorCodes.INVALID_EMAIL_ADDRESS]: 'email.invalid_format',
	[ValidationErrorCodes.INVALID_MESSAGE_DATA]: 'messages.invalid_message_data',
	[ValidationErrorCodes.FORWARD_MESSAGES_CANNOT_CONTAIN_CONTENT]:
		'messages.forward_messages_cannot_include_extra_content',
	[ValidationErrorCodes.FORWARD_REFERENCE_REQUIRES_CHANNEL_AND_MESSAGE]:
		'messages.forward_reference_requires_channel_and_message',
	[APIErrorCodes.INVALID_RESPONSE_TYPE_FOR_NON_BOT]: 'bots.invalid_response_type_for_non_bot',
	[APIErrorCodes.INVALID_SCOPE]: 'auth_and_oauth.invalid_scope',
	[APIErrorCodes.INVALID_STREAM_KEY_FORMAT]: 'calls_and_voice.invalid_stream_key_format',
	[APIErrorCodes.INVALID_STREAM_THUMBNAIL_PAYLOAD]: 'calls_and_voice.invalid_stream_thumbnail_payload',
	[APIErrorCodes.INVALID_SUDO_TOKEN]: 'auth_and_oauth.invalid_sudo_token',
	[APIErrorCodes.INVALID_SUSPICIOUS_FLAGS_FORMAT]: 'admin_and_system.invalid_suspicious_flags_format',
	[APIErrorCodes.INVALID_SYSTEM_FLAG]: 'admin_and_system.invalid_system_flag',
	[APIErrorCodes.INVALID_TIMESTAMP]: 'admin_and_system.invalid_timestamp',
	[APIErrorCodes.INVALID_TOKEN]: 'auth_and_oauth.invalid_or_expired_authorization_token',
	[APIErrorCodes.INVALID_WEBAUTHN_AUTHENTICATION_COUNTER]: 'mfa_and_passkeys.invalid_webauthn_authentication_counter',
	[APIErrorCodes.INVALID_WEBAUTHN_CREDENTIAL_COUNTER]: 'mfa_and_passkeys.invalid_webauthn_credential_counter',
	[APIErrorCodes.INVALID_WEBAUTHN_CREDENTIAL]: 'mfa_and_passkeys.invalid_webauthn_credential',
	[APIErrorCodes.INVALID_WEBAUTHN_PUBLIC_KEY_FORMAT]: 'mfa_and_passkeys.invalid_webauthn_public_key_format',
	[APIErrorCodes.INVITES_DISABLED]: 'channels_and_guilds.invites_disabled',
	[APIErrorCodes.IP_AUTHORIZATION_REQUIRED]: 'account.ip_authorization_required',
	[APIErrorCodes.IP_AUTHORIZATION_RESEND_COOLDOWN]: 'rate_limits.ip_authorization_resend_cooldown',
	[APIErrorCodes.IP_AUTHORIZATION_RESEND_LIMIT_EXCEEDED]: 'rate_limits.ip_authorization_resend_limit_exceeded',
	[APIErrorCodes.IP_BANNED]: 'permissions.user_ip_banned_from_guild',
	[APIErrorCodes.MAX_ANIMATED_EMOJIS]: 'invites_and_packs.max_animated_emojis_reached',
	[APIErrorCodes.MAX_BOOKMARKS]: 'misc_limits.max_bookmarks_reached',
	[APIErrorCodes.MAX_CATEGORY_CHANNELS]: 'misc_limits.max_category_channels_reached',
	[APIErrorCodes.MAX_EMOJIS]: 'invites_and_packs.max_emojis_reached',
	[APIErrorCodes.MAX_FAVORITE_MEMES]: 'media_and_memes.max_favorite_memes_reached',
	[APIErrorCodes.MAX_FRIENDS]: 'misc_limits.max_friends_reached',
	[APIErrorCodes.MAX_GROUP_DM_RECIPIENTS]: 'channels_and_guilds.max_group_dm_recipients_reached',
	[APIErrorCodes.MAX_GROUP_DMS]: 'channels_and_guilds.max_group_dms_reached',
	[APIErrorCodes.MAX_GUILD_CHANNELS]: 'channels_and_guilds.max_guild_channels_reached',
	[APIErrorCodes.MAX_GUILD_MEMBERS]: 'channels_and_guilds.max_guild_members_reached',
	[APIErrorCodes.MAX_GUILD_ROLES]: 'channels_and_guilds.max_guild_roles_reached',
	[APIErrorCodes.MAX_GUILDS]: 'channels_and_guilds.max_guilds_reached',
	[APIErrorCodes.MAX_INVITES]: 'misc_limits.max_invites_reached',
	[APIErrorCodes.MAX_PACK_EXPRESSIONS]: 'invites_and_packs.max_pack_expressions_reached',
	[APIErrorCodes.MAX_PACKS]: 'invites_and_packs.max_packs_reached',
	[APIErrorCodes.MAX_PINS_PER_CHANNEL]: 'misc_limits.max_pins_per_channel_reached',
	[APIErrorCodes.MAX_REACTIONS]: 'stickers_and_emojis.max_reactions_reached',
	[APIErrorCodes.MAX_STICKERS]: 'stickers_and_emojis.max_stickers_reached',
	[APIErrorCodes.MAX_WEBHOOKS_PER_CHANNEL]: 'webhooks.max_webhooks_per_channel_reached',
	[APIErrorCodes.MAX_WEBHOOKS_PER_GUILD]: 'webhooks.max_webhooks_per_guild_reached',
	[APIErrorCodes.MAX_WEBHOOKS]: 'webhooks.max_webhooks_reached',
	[APIErrorCodes.NCMEC_ALREADY_SUBMITTED]: 'content_and_safety.ncmec_already_submitted',
	[APIErrorCodes.NCMEC_SUBMISSION_FAILED]: 'content_and_safety.ncmec_submission_failed',
	[APIErrorCodes.MEDIA_METADATA_ERROR]: 'media_and_memes.media_metadata_error',
	[APIErrorCodes.METHOD_NOT_ALLOWED]: 'http.method_not_allowed',
	[ValidationErrorCodes.MEDIA_ALREADY_IN_FAVORITE_MEMES]: 'media_and_memes.media_already_in_favorites',
	[APIErrorCodes.MISSING_ACCESS]: 'permissions.missing_access',
	[APIErrorCodes.MISSING_ACL]: 'admin_and_system.missing_acl',
	[APIErrorCodes.MISSING_AUTHORIZATION]: 'auth_and_oauth.missing_authorization',
	[APIErrorCodes.MISSING_CLIENT_SECRET]: 'auth_and_oauth.missing_client_secret',
	[APIErrorCodes.MISSING_EPHEMERAL_KEY]: 'admin_and_system.missing_ephemeral_key',
	[APIErrorCodes.MISSING_IV]: 'admin_and_system.missing_iv',
	[APIErrorCodes.MISSING_OAUTH_ADMIN_SCOPE]: 'auth_and_oauth.oauth_admin_scope_required',
	[APIErrorCodes.MISSING_OAUTH_FIELDS]: 'auth_and_oauth.oauth_fields_missing',
	[APIErrorCodes.MISSING_OAUTH_SCOPE]: 'auth_and_oauth.invalid_scope',
	[APIErrorCodes.MISSING_PERMISSIONS]: 'permissions.missing_permissions',
	[APIErrorCodes.MISSING_REDIRECT_URI]: 'auth_and_oauth.missing_redirect_uri',
	[APIErrorCodes.NO_ACTIVE_CALL]: 'calls_and_voice.no_active_call',
	[APIErrorCodes.NO_ACTIVE_SUBSCRIPTION]: 'premium_and_plans.no_active_subscription',
	[APIErrorCodes.NO_PASSKEYS_REGISTERED]: 'mfa_and_passkeys.no_passkeys_registered',
	[APIErrorCodes.NO_PENDING_DELETION]: 'misc.invalid_request_generic',
	[APIErrorCodes.NO_USERS_WITH_FLUXERTAG_EXIST]: 'usernames_and_tags.too_many_users_with_this_username',
	[APIErrorCodes.NO_VISIONARY_SLOTS_AVAILABLE]: 'premium_and_plans.no_visionary_slots_available',
	[APIErrorCodes.NOT_A_BOT_APPLICATION]: 'bots.not_a_bot_application',
	[APIErrorCodes.NOT_FOUND]: 'http.not_found',
	[APIErrorCodes.NOT_FRIENDS_WITH_USER]: 'friends_and_dms.not_friends',
	[APIErrorCodes.NOT_IMPLEMENTED]: 'http.not_implemented',
	[APIErrorCodes.NOT_OWNER_OF_ADMIN_API_KEY]: 'permissions.not_owner_of_admin_api_key',
	[APIErrorCodes.NSFW_CONTENT_AGE_RESTRICTED]: 'content_and_safety.nsfw_age_restricted',
	[APIErrorCodes.PACK_ACCESS_DENIED]: 'invites_and_packs.pack_access_denied',
	[APIErrorCodes.PASSKEY_AUTHENTICATION_FAILED]: 'mfa_and_passkeys.passkey_authentication_failed',
	[APIErrorCodes.PASSKEYS_DISABLED]: 'mfa_and_passkeys.passkeys_disabled',
	[APIErrorCodes.PHONE_ALREADY_USED]: 'phone.number_already_used',
	[APIErrorCodes.PHONE_RATE_LIMIT_EXCEEDED]: 'rate_limits.phone_rate_limit_exceeded',
	[APIErrorCodes.PHONE_REQUIRED_FOR_SMS_MFA]: 'phone.phone_required_for_sms_mfa',
	[APIErrorCodes.PHONE_VERIFICATION_REQUIRED]: 'phone.verification_required',
	[APIErrorCodes.PREMIUM_PURCHASE_BLOCKED]: 'premium_and_plans.no_active_subscription',
	[APIErrorCodes.PREVIEW_MUST_BE_JPEG]: 'attachments_and_uploads.preview_must_be_jpeg',
	[APIErrorCodes.PROCESSING_FAILED]: 'admin_and_system.processing_failed',
	[APIErrorCodes.RATE_LIMITED]: 'rate_limits.rate_limited',
	[APIErrorCodes.REDIRECT_URI_REQUIRED_FOR_NON_BOT]: 'auth_and_oauth.redirect_uri_required_for_non_bot_scopes',
	[APIErrorCodes.REPORT_ALREADY_RESOLVED]: 'moderation_and_reports.report_already_resolved',
	[APIErrorCodes.REPORT_BANNED]: 'moderation_and_reports.report_banned',
	[APIErrorCodes.RESPONSE_VALIDATION_ERROR]: 'admin_and_system.response_validation_failed',
	[APIErrorCodes.SERVICE_UNAVAILABLE]: 'http.service_unavailable',
	[APIErrorCodes.SESSION_TOKEN_MISMATCH]: 'account.session_token_mismatch',
	[APIErrorCodes.SLOWMODE_RATE_LIMITED]: 'rate_limits.slowmode_rate_limited',
	[APIErrorCodes.SMS_MFA_NOT_ENABLED]: 'phone.sms_mfa_not_enabled',
	[APIErrorCodes.SMS_MFA_REQUIRES_TOTP]: 'phone.sms_mfa_requires_totp',
	[APIErrorCodes.SMS_VERIFICATION_UNAVAILABLE]: 'phone.sms_verification_unavailable',
	[APIErrorCodes.SSO_REQUIRED]: 'misc.invalid_request_generic',
	[APIErrorCodes.STREAM_KEY_CHANNEL_MISMATCH]: 'calls_and_voice.stream_key_channel_mismatch',
	[APIErrorCodes.STREAM_KEY_SCOPE_MISMATCH]: 'calls_and_voice.stream_key_scope_mismatch',
	[APIErrorCodes.STREAM_THUMBNAIL_PAYLOAD_EMPTY]: 'calls_and_voice.stream_thumbnail_payload_empty',
	[APIErrorCodes.STRIPE_ERROR]: 'stripe.error',
	[APIErrorCodes.STRIPE_GIFT_REDEMPTION_IN_PROGRESS]: 'invites_and_gifts.stripe_gift_redemption_in_progress',
	[APIErrorCodes.STRIPE_INVALID_PRODUCT]: 'stripe.invalid_product_selection',
	[APIErrorCodes.STRIPE_INVALID_PRODUCT_CONFIGURATION]: 'stripe.invalid_product_configuration',
	[APIErrorCodes.STRIPE_NO_ACTIVE_SUBSCRIPTION]: 'stripe.no_active_subscription_found',
	[APIErrorCodes.STRIPE_NO_PURCHASE_HISTORY]: 'stripe.no_purchase_history_customer_portal_unavailable',
	[APIErrorCodes.STRIPE_NO_SUBSCRIPTION]: 'stripe.no_subscription_found',
	[APIErrorCodes.STRIPE_PAYMENT_NOT_AVAILABLE]: 'stripe.payment_not_available',
	[APIErrorCodes.STRIPE_SUBSCRIPTION_ALREADY_CANCELING]: 'stripe.subscription_already_canceling',
	[APIErrorCodes.STRIPE_SUBSCRIPTION_NOT_CANCELING]: 'stripe.subscription_not_canceling',
	[APIErrorCodes.STRIPE_SUBSCRIPTION_PERIOD_END_MISSING]: 'stripe.subscription_period_end_missing',
	[APIErrorCodes.STRIPE_WEBHOOK_NOT_AVAILABLE]: 'stripe.webhook_not_available',
	[APIErrorCodes.STRIPE_WEBHOOK_SIGNATURE_INVALID]: 'stripe.webhook_signature_invalid',
	[APIErrorCodes.STRIPE_WEBHOOK_SIGNATURE_MISSING]: 'stripe.webhook_signature_missing',
	[APIErrorCodes.DONATION_AMOUNT_INVALID]: 'donation.amount_invalid',
	[APIErrorCodes.DONATION_MAGIC_LINK_EXPIRED]: 'donation.magic_link_expired',
	[APIErrorCodes.DONATION_MAGIC_LINK_INVALID]: 'donation.magic_link_invalid',
	[APIErrorCodes.DONATION_MAGIC_LINK_USED]: 'donation.magic_link_used',
	[APIErrorCodes.DONOR_NOT_FOUND]: 'donation.donor_not_found',
	[APIErrorCodes.SUDO_MODE_REQUIRED]: 'auth_and_oauth.sudo_mode_required',
	[APIErrorCodes.TAG_ALREADY_TAKEN]: 'usernames_and_tags.tag_already_taken',
	[APIErrorCodes.TEMPORARY_INVITE_REQUIRES_PRESENCE]: 'channels_and_guilds.temporary_invite_requires_presence',
	[APIErrorCodes.TEST_HARNESS_DISABLED]: 'admin_and_system.test_harness_disabled',
	[APIErrorCodes.TEST_HARNESS_FORBIDDEN]: 'admin_and_system.test_harness_forbidden',
	[APIErrorCodes.TWO_FA_NOT_ENABLED]: 'mfa_and_passkeys.two_factor_not_enabled',
	[APIErrorCodes.TWO_FACTOR_REQUIRED]: 'mfa_and_passkeys.two_factor_required',
	[APIErrorCodes.UNAUTHORIZED]: 'account.unauthorized',
	[APIErrorCodes.UNCLAIMED_ACCOUNT_CANNOT_ACCEPT_FRIEND_REQUESTS]: 'friends_and_dms.not_friends',
	[APIErrorCodes.UNCLAIMED_ACCOUNT_CANNOT_ADD_REACTIONS]: 'misc.invalid_request_generic',
	[APIErrorCodes.UNCLAIMED_ACCOUNT_CANNOT_CREATE_APPLICATIONS]: 'misc.invalid_request_generic',
	[APIErrorCodes.UNCLAIMED_ACCOUNT_CANNOT_JOIN_GROUP_DMS]: 'friends_and_dms.cannot_add_yourself_to_group_dm',
	[APIErrorCodes.UNCLAIMED_ACCOUNT_CANNOT_JOIN_ONE_ON_ONE_VOICE_CALLS]: 'misc.invalid_request_generic',
	[APIErrorCodes.UNCLAIMED_ACCOUNT_CANNOT_JOIN_VOICE_CHANNELS]: 'misc.invalid_request_generic',
	[APIErrorCodes.UNCLAIMED_ACCOUNT_CANNOT_MAKE_PURCHASES]: 'misc.invalid_request_generic',
	[APIErrorCodes.UNCLAIMED_ACCOUNT_CANNOT_SEND_DIRECT_MESSAGES]: 'friends_and_dms.cannot_send_messages_to_user',
	[APIErrorCodes.UNCLAIMED_ACCOUNT_CANNOT_SEND_FRIEND_REQUESTS]: 'friends_and_dms.bots_cannot_send_friend_requests',
	[APIErrorCodes.UNCLAIMED_ACCOUNT_CANNOT_SEND_MESSAGES]: 'misc.invalid_request_generic',
	[APIErrorCodes.UNKNOWN_CHANNEL]: 'unknown_entities.unknown_channel',
	[APIErrorCodes.UNKNOWN_EMOJI]: 'stickers_and_emojis.unknown_emoji',
	[APIErrorCodes.UNKNOWN_FAVORITE_MEME]: 'media_and_memes.unknown_favorite_meme',
	[APIErrorCodes.UNKNOWN_GIFT_CODE]: 'invites_and_gifts.unknown_gift_code',
	[APIErrorCodes.UNKNOWN_GUILD]: 'unknown_entities.unknown_guild',
	[APIErrorCodes.UNKNOWN_HARVEST]: 'harvest.unknown',
	[APIErrorCodes.UNKNOWN_INVITE]: 'unknown_entities.unknown_invite',
	[APIErrorCodes.UNKNOWN_MEMBER]: 'unknown_entities.unknown_member',
	[APIErrorCodes.UNKNOWN_MESSAGE]: 'unknown_entities.unknown_message',
	[APIErrorCodes.UNKNOWN_PACK]: 'unknown_entities.unknown_pack',
	[APIErrorCodes.UNKNOWN_REPORT]: 'moderation_and_reports.unknown_report',
	[APIErrorCodes.UNKNOWN_ROLE]: 'unknown_entities.unknown_role',
	[APIErrorCodes.UNKNOWN_STICKER]: 'stickers_and_emojis.unknown_sticker',
	[APIErrorCodes.UNKNOWN_SUSPICIOUS_FLAG]: 'admin_and_system.unknown_suspicious_flag',
	[APIErrorCodes.UNKNOWN_USER_FLAG]: 'unknown_entities.unknown_user_flag',
	[APIErrorCodes.UNKNOWN_USER]: 'unknown_entities.unknown_user',
	[APIErrorCodes.UNKNOWN_VOICE_REGION]: 'calls_and_voice.unknown_voice_region',
	[APIErrorCodes.UNKNOWN_VOICE_SERVER]: 'calls_and_voice.unknown_voice_server',
	[APIErrorCodes.UNKNOWN_WEBAUTHN_CREDENTIAL]: 'mfa_and_passkeys.unknown_webauthn_credential',
	[APIErrorCodes.UNKNOWN_APPLICATION]: 'auth_and_oauth.unknown_application',
	[APIErrorCodes.UNKNOWN_WEBHOOK]: 'webhooks.unknown_webhook',
	[APIErrorCodes.UNSUPPORTED_RESPONSE_TYPE]: 'auth_and_oauth.unsupported_response_type',
	[APIErrorCodes.UPDATE_FAILED]: 'admin_and_system.update_failed',
	[APIErrorCodes.USERNAME_NOT_AVAILABLE]: 'usernames_and_tags.username_not_available',
	[APIErrorCodes.USER_BANNED_FROM_GUILD]: 'permissions.user_banned_from_guild',
	[APIErrorCodes.USER_IP_BANNED_FROM_GUILD]: 'permissions.user_ip_banned_from_guild',
	[APIErrorCodes.USER_NOT_IN_VOICE]: 'permissions.user_not_in_voice',
	[APIErrorCodes.USER_OWNS_GUILDS]: 'permissions.user_owns_guilds',
	[APIErrorCodes.VOICE_CHANNEL_FULL]: 'channels_and_guilds.voice_channel_full',
	[APIErrorCodes.WEBAUTHN_CREDENTIAL_LIMIT_REACHED]: 'mfa_and_passkeys.webauthn_credential_limit_reached',
	[ValidationErrorCodes.MESSAGE_IDS_CANNOT_BE_EMPTY]: 'messages.message_ids_cannot_be_empty',
	[ValidationErrorCodes.MESSAGES_ARRAY_REQUIRED_AND_NOT_EMPTY]: 'messages.messages_array_required',
	[ValidationErrorCodes.MESSAGES_WITH_SNAPSHOTS_CANNOT_BE_EDITED]: 'messages.messages_with_snapshots_cannot_be_edited',
	[ValidationErrorCodes.MESSAGE_HISTORY_CUTOFF_BEFORE_GUILD_CREATION]:
		'channels_and_guilds.message_history_cutoff_before_guild_creation',
	[ValidationErrorCodes.MESSAGE_HISTORY_CUTOFF_IN_FUTURE]: 'channels_and_guilds.message_history_cutoff_in_future',
	[ValidationErrorCodes.CANNOT_REPLY_TO_SYSTEM_MESSAGE]: 'messages.cannot_reply_to_system_message',
	[ValidationErrorCodes.CANNOT_DELETE_MORE_THAN_100_MESSAGES]: 'messages.cannot_delete_more_than_100',
	[ValidationErrorCodes.VOICE_MESSAGES_ATTACHMENT_DURATION_REQUIRED]: 'calls_and_voice.voice_message_duration_required',
	[ValidationErrorCodes.VOICE_MESSAGES_ATTACHMENT_MUST_BE_AUDIO]: 'messages.voice_messages_attachment_must_be_audio',
	[ValidationErrorCodes.VOICE_MESSAGES_ATTACHMENT_WAVEFORM_REQUIRED]: 'calls_and_voice.voice_message_waveform_required',
	[ValidationErrorCodes.VOICE_MESSAGES_CANNOT_HAVE_CONTENT]: 'messages.voice_messages_cannot_have_content',
	[ValidationErrorCodes.VOICE_MESSAGES_CANNOT_HAVE_EMBEDS]: 'messages.voice_messages_cannot_have_embeds',
	[ValidationErrorCodes.VOICE_MESSAGES_CANNOT_HAVE_FAVORITE_MEMES]:
		'messages.voice_messages_cannot_have_favorite_memes',
	[ValidationErrorCodes.VOICE_MESSAGES_CANNOT_HAVE_STICKERS]: 'messages.voice_messages_cannot_have_stickers',
	[ValidationErrorCodes.VOICE_MESSAGES_DURATION_EXCEEDS_LIMIT]: 'calls_and_voice.voice_message_duration_exceeds_limit',
	[ValidationErrorCodes.VOICE_MESSAGES_REQUIRE_SINGLE_ATTACHMENT]:
		'calls_and_voice.voice_messages_require_single_attachment',
	[ValidationErrorCodes.SCHEDULED_TIME_MUST_BE_FUTURE]: 'messages.scheduled_time_must_be_future',
	[ValidationErrorCodes.SCHEDULED_MESSAGES_MAX_30_DAYS]: 'messages.scheduled_messages_max_30_days',
	[ValidationErrorCodes.INVALID_SCHEDULED_MESSAGE_PAYLOAD]: 'messages.invalid_scheduled_message_payload',
	[ValidationErrorCodes.INVALID_DATETIME_FOR_SCHEDULED_SEND]: 'messages.scheduled_send_datetime_invalid',
	[ValidationErrorCodes.MUST_START_SESSION_BEFORE_SENDING]: 'auth_and_oauth.must_start_session_before_sending_messages',
	[ValidationErrorCodes.TOO_MANY_EMBEDS]: 'embeds.too_many_embeds',
	[ValidationErrorCodes.ATTACHMENTS_METADATA_REQUIRED_WHEN_UPLOADING]:
		'attachments_and_uploads.attachments_metadata_required_when_uploading',
	[ValidationErrorCodes.CANNOT_REFERENCE_ATTACHMENTS_WITHOUT_ATTACHMENTS]:
		'attachments_and_uploads.cannot_reference_attachments_without_attachments',
	[ValidationErrorCodes.NO_METADATA_FOR_FILE]: 'attachments_and_uploads.no_metadata_for_file',
	[ValidationErrorCodes.NO_FILE_FOR_ATTACHMENT]: 'attachments_and_uploads.no_file_uploaded_for_attachment',
	[ValidationErrorCodes.NO_FILE_FOR_ATTACHMENT_METADATA]:
		'attachments_and_uploads.no_file_uploaded_for_attachment_metadata',
	[ValidationErrorCodes.ATTACHMENT_FIELDS_REQUIRED]: 'attachments_and_uploads.attachment_fields_required',
	[ValidationErrorCodes.ATTACHMENT_IDS_MUST_BE_VALID_INTEGERS]:
		'attachments_and_uploads.attachment_ids_must_be_valid_integers',
	[ValidationErrorCodes.ATTACHMENTS_NOT_ALLOWED_FOR_MESSAGE]:
		'attachments_and_uploads.attachments_not_allowed_for_message',
	[ValidationErrorCodes.DUPLICATE_ATTACHMENT_IDS_NOT_ALLOWED]:
		'attachments_and_uploads.duplicate_attachment_ids_not_allowed',
	[ValidationErrorCodes.DUPLICATE_FILE_INDEX]: 'attachments_and_uploads.duplicate_file_index',
	[ValidationErrorCodes.FAILED_TO_PARSE_MULTIPART_FORM_DATA]:
		'attachments_and_uploads.failed_to_parse_multipart_form_data',
	[ValidationErrorCodes.FAILED_TO_PARSE_MULTIPART_PAYLOAD]: 'attachments_and_uploads.failed_to_parse_multipart_payload',
	[ValidationErrorCodes.FAILED_TO_UPLOAD_IMAGE]: 'attachments_and_uploads.failed_to_upload_image',
	[ValidationErrorCodes.FILE_INDEX_EXCEEDS_MAXIMUM]: 'attachments_and_uploads.file_index_exceeds_maximum',
	[ValidationErrorCodes.FILE_NOT_FOUND]: 'attachments_and_uploads.file_not_found',
	[ValidationErrorCodes.FILE_NOT_FOUND_FOR_SCANNING]: 'attachments_and_uploads.file_not_found_for_scanning',
	[ValidationErrorCodes.FILENAME_EMPTY_AFTER_NORMALIZATION]:
		'attachments_and_uploads.filename_empty_after_normalization',
	[ValidationErrorCodes.FILENAME_INVALID_CHARACTERS]: 'attachments_and_uploads.filename_invalid_characters',
	[ValidationErrorCodes.FILENAME_LENGTH_INVALID]: 'attachments_and_uploads.filename_length_invalid',
	[ValidationErrorCodes.FILENAME_MISMATCH_FOR_ATTACHMENT]: 'attachments_and_uploads.filename_mismatch_for_attachment',
	[ValidationErrorCodes.IMAGE_SIZE_EXCEEDS_LIMIT]: 'attachments_and_uploads.image_size_exceeds_limit',
	[ValidationErrorCodes.INVALID_FILE_FIELD_NAME]: 'attachments_and_uploads.invalid_file_field_name',
	[ValidationErrorCodes.INVALID_IMAGE_DATA]: 'attachments_and_uploads.invalid_image_data',
	[ValidationErrorCodes.INVALID_URL_FORMAT]: 'urls.invalid_url_format',
	[ValidationErrorCodes.INVALID_URL_OR_ATTACHMENT_FORMAT]: 'urls.invalid_url_or_attachment_reference',
	[ValidationErrorCodes.MULTIPLE_FILES_FOR_INDEX_NOT_ALLOWED]:
		'attachments_and_uploads.multiple_files_for_index_not_allowed',
	[ValidationErrorCodes.NO_VALID_MEDIA_IN_MESSAGE]: 'attachments_and_uploads.no_valid_media_in_message',
	[ValidationErrorCodes.PAYLOAD_JSON_REQUIRED_FOR_MULTIPART]:
		'attachments_and_uploads.payload_json_required_for_multipart',
	[ValidationErrorCodes.SIZE_BYTES_MUST_BE_VALID_INTEGER]: 'attachments_and_uploads.size_bytes_must_be_valid_integer',
	[ValidationErrorCodes.TOO_MANY_FILES]: 'attachments_and_uploads.too_many_files',
	[ValidationErrorCodes.UNKNOWN_IMAGE_FORMAT]: 'attachments_and_uploads.unknown_image_format',
	[ValidationErrorCodes.UNRESOLVED_ATTACHMENT_URL]: 'attachments_and_uploads.unresolved_attachment_url',
	[ValidationErrorCodes.UPLOADED_ATTACHMENT_NOT_FOUND]: 'attachments_and_uploads.uploaded_attachment_not_found',
	[ValidationErrorCodes.URL_LENGTH_INVALID]: 'urls.url_length_invalid',
	[ValidationErrorCodes.ACCENT_COLOR_CHANGED_TOO_MANY_TIMES]: 'rate_limits.accent_color_changed_too_often',
	[ValidationErrorCodes.AVATAR_CHANGED_TOO_MANY_TIMES]: 'rate_limits.avatar_changed_too_often',
	[ValidationErrorCodes.BANNER_CHANGED_TOO_MANY_TIMES]: 'rate_limits.banner_changed_too_often',
	[ValidationErrorCodes.BIO_CHANGED_TOO_MANY_TIMES]: 'rate_limits.bio_changed_too_often',
	[ValidationErrorCodes.PRONOUNS_CHANGED_TOO_MANY_TIMES]: 'rate_limits.pronouns_changed_too_often',
	[ValidationErrorCodes.USERNAME_CHANGED_TOO_MANY_TIMES]: 'rate_limits.username_changed_too_often',
	[ValidationErrorCodes.CHANGING_DISCRIMINATOR_REQUIRES_PREMIUM]:
		'premium_and_plans.discriminator_change_requires_premium',
	[ValidationErrorCodes.PREMIUM_REQUIRED_FOR_CUSTOM_EMOJI]: 'premium_and_plans.premium_required_for_custom_emoji',
	[ValidationErrorCodes.DISCRIMINATOR_INVALID_FORMAT]: 'usernames_and_tags.discriminator_invalid_format',
	[ValidationErrorCodes.DISCRIMINATOR_OUT_OF_RANGE]: 'usernames_and_tags.discriminator_out_of_range',
	[ValidationErrorCodes.GLOBAL_NAME_CANNOT_CONTAIN_RESERVED_TERMS]: 'usernames_and_tags.display_name_reserved_terms',
	[ValidationErrorCodes.GLOBAL_NAME_LENGTH_INVALID]: 'usernames_and_tags.global_name_length_invalid',
	[ValidationErrorCodes.GLOBAL_NAME_RESERVED_VALUE]: 'usernames_and_tags.global_name_reserved_value',
	[ValidationErrorCodes.TOO_MANY_USERS_WITH_THIS_USERNAME]: 'usernames_and_tags.too_many_users_with_this_username',
	[ValidationErrorCodes.TOO_MANY_USERS_WITH_USERNAME_TRY_DIFFERENT]:
		'usernames_and_tags.too_many_users_with_username_try_different',
	[ValidationErrorCodes.UNCLAIMED_ACCOUNTS_CAN_ONLY_SET_EMAIL_VIA_TOKEN]:
		'usernames_and_tags.unclaimed_accounts_can_only_set_email_via_token',
	[ValidationErrorCodes.USERNAME_CANNOT_CONTAIN_RESERVED_TERMS]: 'usernames_and_tags.username_reserved_terms',
	[ValidationErrorCodes.USERNAME_INVALID_CHARACTERS]: 'usernames_and_tags.username_invalid_characters',
	[ValidationErrorCodes.USERNAME_LENGTH_INVALID]: 'usernames_and_tags.username_length_invalid',
	[ValidationErrorCodes.USERNAME_RESERVED_VALUE]: 'usernames_and_tags.username_reserved_value',
	[ValidationErrorCodes.VISIONARY_REQUIRED_FOR_BOT_DISCRIMINATOR]:
		'premium_and_plans.visionary_required_for_bot_discriminator',
	[ValidationErrorCodes.VISIONARY_REQUIRED_FOR_DISCRIMINATOR]: 'premium_and_plans.visionary_required_for_discriminator',
	[ValidationErrorCodes.BOT_DISCRIMINATOR_CANNOT_BE_CHANGED]: 'bots.bot_discriminator_cannot_be_changed',
	[ValidationErrorCodes.USER_MUST_BE_A_BOT_TO_BE_MARKED_AS_A_SYSTEM_USER]:
		'admin_and_system.user_must_be_bot_for_system_user',
	[ValidationErrorCodes.USER_IS_NOT_BANNED]: 'moderation_and_reports.user_is_not_banned',
	[ValidationErrorCodes.ACCOUNT_ALREADY_VERIFIED]: 'account.already_verified',
	[ValidationErrorCodes.EMAIL_ALREADY_IN_USE]: 'email.email_already_in_use',
	[ValidationErrorCodes.EMAIL_IS_REQUIRED]: 'email.email_required',
	[ValidationErrorCodes.EMAIL_LENGTH_INVALID]: 'email.length_invalid',
	[ValidationErrorCodes.EMAIL_MUST_BE_CHANGED_VIA_TOKEN]: 'email.must_be_changed_via_token',
	[ValidationErrorCodes.EMAIL_TOKEN_EXPIRED]: 'email.token_expired',
	[ValidationErrorCodes.INVALID_EMAIL_OR_PASSWORD]: 'email.invalid_or_password',
	[ValidationErrorCodes.INVALID_EMAIL_TOKEN]: 'email.invalid_token',
	[ValidationErrorCodes.INVALID_VERIFICATION_CODE]: 'email.invalid_verification_code',
	[ValidationErrorCodes.INVALID_OR_EXPIRED_VERIFICATION_TOKEN]: 'email.invalid_or_expired_verification_token',
	[ValidationErrorCodes.INVALID_OR_EXPIRED_RESET_TOKEN]: 'email.invalid_or_expired_reset_token',
	[ValidationErrorCodes.INVALID_OR_EXPIRED_REVERT_TOKEN]: 'email.invalid_or_expired_revert_token',
	[ValidationErrorCodes.INVALID_OR_EXPIRED_TICKET]: 'auth_and_oauth.invalid_or_expired_ticket',
	[ValidationErrorCodes.INVALID_OR_EXPIRED_AUTHORIZATION_TOKEN]:
		'auth_and_oauth.invalid_or_expired_authorization_token',
	[ValidationErrorCodes.INVALID_PROOF_TOKEN]: 'auth_and_oauth.invalid_proof_token',
	[ValidationErrorCodes.MUST_AGREE_TO_TOS_AND_PRIVACY_POLICY]: 'tos_and_age.must_agree_to_tos_and_privacy',
	[ValidationErrorCodes.MUST_BE_MINIMUM_AGE]: 'tos_and_age.must_be_minimum_age',
	[ValidationErrorCodes.MUST_HAVE_EMAIL_TO_CHANGE_IT]: 'email.must_have_email_to_change_it',
	[ValidationErrorCodes.NEW_EMAIL_MUST_BE_DIFFERENT]: 'email.new_email_must_be_different',
	[ValidationErrorCodes.NO_NEW_EMAIL_REQUESTED]: 'email.no_new_email_requested',
	[ValidationErrorCodes.NO_ORIGINAL_EMAIL_ON_RECORD]: 'email.no_original_email_on_record',
	[ValidationErrorCodes.ORIGINAL_EMAIL_ALREADY_VERIFIED]: 'email.original_email_already_verified',
	[ValidationErrorCodes.ORIGINAL_EMAIL_MUST_BE_VERIFIED_FIRST]: 'email.original_email_must_be_verified_first',
	[ValidationErrorCodes.ORIGINAL_VERIFICATION_NOT_REQUIRED]: 'email.original_verification_not_required',
	[ValidationErrorCodes.INVALID_CURRENT_PASSWORD]: 'auth_and_registration.current_password_incorrect',
	[ValidationErrorCodes.PASSWORD_IS_TOO_COMMON]: 'auth_and_registration.password_is_too_common',
	[ValidationErrorCodes.PASSWORD_NOT_SET]: 'auth_and_registration.password_not_set',
	[ValidationErrorCodes.SESSION_TIMEOUT]: 'account.session_timeout',
	[ValidationErrorCodes.USER_DOES_NOT_HAVE_AN_EMAIL_ADDRESS]: 'email.user_has_no_email_address',
	[ValidationErrorCodes.VERIFICATION_CODE_EXPIRED]: 'email.verification_code_expired',
	[ValidationErrorCodes.VERIFICATION_CODE_NOT_ISSUED]: 'email.verification_code_not_issued',
	[ValidationErrorCodes.CANNOT_DM_YOURSELF]: 'friends_and_dms.cannot_dm_yourself',
	[ValidationErrorCodes.CANNOT_ADD_YOURSELF_TO_GROUP_DM]: 'friends_and_dms.cannot_add_yourself_to_group_dm',
	[ValidationErrorCodes.AT_LEAST_ONE_RECIPIENT_REQUIRED]: 'friends_and_dms.at_least_one_recipient_required',
	[ValidationErrorCodes.DUPLICATE_RECIPIENTS_NOT_ALLOWED]: 'friends_and_dms.duplicate_recipients_not_allowed',
	[ValidationErrorCodes.RECIPIENT_IDS_CANNOT_BE_EMPTY]: 'friends_and_dms.recipient_ids_cannot_be_empty',
	[ValidationErrorCodes.RECIPIENT_IDS_MUST_BE_STRINGS]: 'friends_and_dms.recipient_ids_must_be_strings',
	[ValidationErrorCodes.RECIPIENT_IDS_MUST_BE_VALID_SNOWFLAKES]:
		'friends_and_dms.recipient_ids_must_be_valid_snowflakes',
	[ValidationErrorCodes.CHANNEL_DOES_NOT_EXIST]: 'channels_and_guilds.channel_not_found',
	[ValidationErrorCodes.CHANNEL_ID_IS_REQUIRED]: 'channels_and_guilds.channel_id_required',
	[ValidationErrorCodes.CHANNEL_MUST_BE_DM_OR_GROUP_DM]: 'channels_and_guilds.channel_must_be_dm_or_group_dm',
	[ValidationErrorCodes.CHANNEL_MUST_BE_VOICE]: 'channels_and_guilds.channel_must_be_voice',
	[ValidationErrorCodes.CHANNEL_NAME_EMPTY_AFTER_NORMALIZATION]:
		'names_and_normalization.channel_name_empty_after_normalization',
	[ValidationErrorCodes.CATEGORIES_CANNOT_HAVE_PARENT_CHANNEL]:
		'channels_and_guilds.categories_cannot_have_parent_channel',
	[ValidationErrorCodes.CATEGORIES_CANNOT_HAVE_PARENTS]: 'channels_and_guilds.categories_cannot_have_parents',
	[ValidationErrorCodes.AFK_CHANNEL_MUST_BE_IN_GUILD]: 'channels_and_guilds.afk_channel_must_be_in_guild',
	[ValidationErrorCodes.AFK_CHANNEL_MUST_BE_VOICE]: 'channels_and_guilds.afk_channel_must_be_voice',
	[ValidationErrorCodes.ALL_CHANNELS_MUST_BELONG_TO_GUILD]: 'channels_and_guilds.all_channels_must_belong_to_guild',
	[ValidationErrorCodes.CANNOT_POSITION_CHANNEL_RELATIVE_TO_ITSELF]:
		'channels_and_guilds.cannot_position_channel_relative_to_itself',
	[ValidationErrorCodes.CANNOT_SPECIFY_BOTH_BEFORE_AND_AFTER]: 'limits.cannot_specify_before_and_after',
	[ValidationErrorCodes.INVALID_CHANNEL]: 'channels_and_guilds.invalid_channel',
	[ValidationErrorCodes.INVALID_CHANNEL_ID]: 'channels_and_guilds.invalid_channel_id',
	[ValidationErrorCodes.INVALID_PARENT_CHANNEL]: 'channels_and_guilds.invalid_parent_channel',
	[ValidationErrorCodes.PARENT_CHANNEL_NOT_IN_GUILD]: 'channels_and_guilds.parent_channel_not_in_guild',
	[ValidationErrorCodes.PARENT_MUST_BE_CATEGORY]: 'channels_and_guilds.parent_must_be_category',
	[ValidationErrorCodes.PRECEDING_CHANNEL_MUST_SHARE_PARENT]: 'channels_and_guilds.preceding_channel_must_share_parent',
	[ValidationErrorCodes.PRECEDING_CHANNEL_NOT_IN_GUILD]: 'channels_and_guilds.preceding_channel_not_in_guild',
	[ValidationErrorCodes.SYSTEM_CHANNEL_MUST_BE_IN_GUILD]: 'channels_and_guilds.system_channel_must_be_in_guild',
	[ValidationErrorCodes.SYSTEM_CHANNEL_MUST_BE_TEXT]: 'channels_and_guilds.system_channel_must_be_text',
	[ValidationErrorCodes.VOICE_CHANNELS_CANNOT_BE_ABOVE_TEXT_CHANNELS]:
		'channels_and_guilds.voice_channels_cannot_be_above_text_channels',
	[ValidationErrorCodes.CONTEXT_CHANNEL_OR_GUILD_ID_REQUIRED]: 'channels_and_guilds.context_channel_or_guild_required',
	[ValidationErrorCodes.USER_NOT_IN_CHANNEL]: 'permissions.user_not_in_channel',
	[ValidationErrorCodes.NOT_A_VALID_UNICODE_EMOJI]: 'stickers_and_emojis.not_valid_unicode_emoji',
	[ValidationErrorCodes.CUSTOM_EMOJI_NOT_FOUND]: 'stickers_and_emojis.custom_emoji_not_found',
	[ValidationErrorCodes.CUSTOM_EMOJIS_REQUIRE_PREMIUM_OUTSIDE_SOURCE]:
		'premium_and_plans.custom_emojis_outside_source_require_premium',
	[ValidationErrorCodes.CUSTOM_STICKER_NOT_FOUND]: 'stickers_and_emojis.custom_sticker_not_found',
	[ValidationErrorCodes.CUSTOM_STICKERS_IN_DMS_REQUIRE_PREMIUM]:
		'premium_and_plans.custom_stickers_in_dms_require_premium',
	[ValidationErrorCodes.CUSTOM_STICKERS_REQUIRE_PREMIUM_OUTSIDE_SOURCE]:
		'premium_and_plans.custom_stickers_outside_source_require_premium',
	[ValidationErrorCodes.EMOJI_REQUIRES_GUILD_OR_PACK_ACCESS]: 'stickers_and_emojis.emoji_requires_guild_or_pack_access',
	[ValidationErrorCodes.FAVORITE_MEME_NAME_REQUIRED]: 'media_and_memes.favorite_meme_name_required',
	[ValidationErrorCodes.FAVORITE_MEME_NOT_FOUND]: 'media_and_memes.favorite_meme_not_found',
	[ValidationErrorCodes.CANNOT_SET_HOIST_FOR_EVERYONE_ROLE]: 'roles.cannot_set_everyone_hoist',
	[ValidationErrorCodes.CANNOT_USE_SAME_ROLE_AS_PRECEDING]: 'roles.cannot_use_same_role_as_preceding',
	[ValidationErrorCodes.PRECEDING_ROLE_NOT_IN_GUILD]: 'roles.preceding_role_not_in_guild',
	[ValidationErrorCodes.PARSE_AND_USERS_OR_ROLES_CANNOT_BE_USED_TOGETHER]:
		'roles.parse_and_users_or_roles_cannot_be_used_together',
	[ValidationErrorCodes.ANIMATED_GUILD_BANNER_REQUIRES_FEATURE]:
		'channels_and_guilds.animated_guild_banner_requires_feature',
	[ValidationErrorCodes.EMBED_SPLASH_REQUIRES_FEATURE]: 'embeds.embed_splash_requires_feature',
	[ValidationErrorCodes.GUILD_BANNER_REQUIRES_FEATURE]: 'channels_and_guilds.guild_banner_requires_feature',
	[ValidationErrorCodes.INVITE_SPLASH_REQUIRES_FEATURE]: 'channels_and_guilds.invite_splash_requires_feature',
	[ValidationErrorCodes.VANITY_URL_REQUIRES_FEATURE]: 'channels_and_guilds.vanity_url_requires_feature',
	[ValidationErrorCodes.THIS_VANITY_URL_IS_ALREADY_TAKEN]: 'vanity_urls.vanity_url_already_taken',
	[ValidationErrorCodes.VANITY_URL_CODE_ALREADY_TAKEN]: 'vanity_urls.vanity_url_code_already_taken',
	[ValidationErrorCodes.VANITY_URL_CODE_CANNOT_CONTAIN_FLUXER]: 'vanity_urls.vanity_url_code_cannot_contain_fluxer',
	[ValidationErrorCodes.VANITY_URL_CODE_LENGTH_INVALID]: 'vanity_urls.vanity_url_code_length_invalid',
	[ValidationErrorCodes.VANITY_URL_INVALID_CHARACTERS]: 'vanity_urls.vanity_url_invalid_characters',
	[ValidationErrorCodes.WEBHOOK_NAME_LENGTH_INVALID]: 'webhooks.webhook_name_length_invalid',
	[ValidationErrorCodes.AT_LEAST_ONE_ENTRY_IS_REQUIRED]: 'limits.at_least_one_entry_required',
	[ValidationErrorCodes.BUCKET_IS_REQUIRED]: 'limits.bucket_required',
	[ValidationErrorCodes.CANNOT_PRELOAD_MORE_THAN_100_CHANNELS]: 'messages.cannot_preload_more_than_100_channels',
	[ValidationErrorCodes.INTEGER_OUT_OF_INT64_RANGE]: 'limits.integer_out_of_int64_range',
	[ValidationErrorCodes.INVALID_AUDIT_LOG_REASON]: 'admin_and_system.invalid_audit_log_reason',
	[ValidationErrorCodes.INVALID_CODE]: 'auth_and_oauth.invalid_code',
	[ValidationErrorCodes.INVALID_DATE_OF_BIRTH_FORMAT]: 'tos_and_age.date_of_birth_format_invalid',
	[ValidationErrorCodes.INVALID_INTEGER_FORMAT]: 'admin_and_system.invalid_integer_format',
	[ValidationErrorCodes.INVALID_ISO_TIMESTAMP]: 'admin_and_system.must_be_iso_timestamp',
	[ValidationErrorCodes.INVALID_JOB_ID]: 'misc.invalid_job_id',
	[ValidationErrorCodes.INVALID_JSON_IN_PAYLOAD_JSON]: 'attachments_and_uploads.invalid_json_in_payload_json',
	[ValidationErrorCodes.INVALID_OR_RESTRICTED_RTC_REGION]: 'calls_and_voice.invalid_or_restricted_rtc_region',
	[ValidationErrorCodes.INVALID_RTC_REGION]: 'calls_and_voice.invalid_rtc_region',
	[ValidationErrorCodes.INVALID_SNOWFLAKE]: 'misc.invalid_snowflake',
	[ValidationErrorCodes.INVALID_SNOWFLAKE_FORMAT]: 'misc.invalid_snowflake',
	[ValidationErrorCodes.INVALID_TIMEOUT_VALUE]: 'admin_and_system.invalid_timeout_value',
	[ValidationErrorCodes.INVALID_TIMEZONE_IDENTIFIER]: 'admin_and_system.invalid_timezone_identifier',
	[ValidationErrorCodes.JOB_ID_IS_REQUIRED]: 'misc.job_id_required',
	[ValidationErrorCodes.JOB_IS_ALREADY_PROCESSED]: 'misc.job_already_processed',
	[ValidationErrorCodes.JOB_NOT_FOUND]: 'misc.job_not_found',
	[ValidationErrorCodes.MUST_ENABLE_2FA_BEFORE_REQUIRING_FOR_MODS]:
		'mfa_and_passkeys.must_enable_2fa_before_enforcing_for_mods',
	[ValidationErrorCodes.NAME_EMPTY_AFTER_NORMALIZATION]: 'names_and_normalization.name_empty_after_normalization',
	[ValidationErrorCodes.PHONE_NUMBER_INVALID_FORMAT]: 'phone.number_format_required',
	[ValidationErrorCodes.ROWS_IS_REQUIRED]: 'limits.rows_required',
	[ValidationErrorCodes.SNOWFLAKE_OUT_OF_RANGE]: 'misc.invalid_snowflake',
	[ValidationErrorCodes.STRING_LENGTH_EXACT]: 'limits.string_length_exact',
	[ValidationErrorCodes.TICKET_ALREADY_COMPLETED]: 'tickets.ticket_already_completed',
	[ValidationErrorCodes.TIMEOUT_CANNOT_EXCEED_365_DAYS]: 'limits.timeout_cannot_exceed_365_days',
	[ValidationErrorCodes.VALUE_MUST_BE_INTEGER_IN_RANGE]: 'limits.value_must_be_integer_in_range',
	[ValidationErrorCodes.VALUE_TOO_SMALL]: 'limits.value_too_small',
	[APIErrorCodes.VALIDATION_ERROR]: 'http.validation_error',
} as const satisfies Record<AllErrorCodes, ErrorI18nKey>;

export type ErrorCodeMapping = typeof ErrorCodeToI18nKey;
