# SeedcordErrorCode

`enum` in `errors` · v0.5.1

<https://docs.seedcord.org/packages/errors/0.5.1/enums/seedcord-error-code>

All Seedcord error codes.

```ts
enum SeedcordErrorCode
```

## Members

- **ConfigEmojiUnresolved** `ConfigEmojiUnresolved` — One or more configured emojis could not be resolved at startup.
- **ConfigWebhookUrlInvalid** `ConfigWebhookUrlInvalid` — A webhook reporter's env var is set but fails webhook URL validation.
- **ConfigWebhookNotFound** `ConfigWebhookNotFound` — A configured webhook does not exist on Discord (deleted, or a wrong id or token).
- **ConfigManifestNotGenerated** `ConfigManifestNotGenerated` — The generated route manifest was imported before `seedcord build` generated it.
- **ConfigMissingEnv** `ConfigMissingEnv` — A required environment variable is not present.
- **ConfigInvalidEnv** `ConfigInvalidEnv` — An environment variable is present and fails validation.
- **MissingGuildsIntent** `MissingGuildsIntent` — A command usable in a guild is registered without the `Guilds` intent that caches guilds.
- **UnsupportedNodeVersion** `UnsupportedNodeVersion` — The running Node version is below the range seedcord declares in `engines`.
- **ConfigTokenUnreadable** `ConfigTokenUnreadable` — `DISCORD_BOT_TOKEN` passed its shape check and carries no readable application id.
- **LifecycleAddAfterCompletion** `LifecycleAddAfterCompletion` — Attempted to add lifecycle tasks after startup already completed.
- **LifecycleAddDuringRun** `LifecycleAddDuringRun` — Attempted to add lifecycle tasks while startup is still running.
- **LifecycleRemoveDuringRun** `LifecycleRemoveDuringRun` — Attempted to remove lifecycle tasks while startup is still running.
- **LifecycleUnknownPhase** `LifecycleUnknownPhase` — Provided lifecycle phase identifier is not recognized.
- **LifecyclePhaseFailures** `LifecyclePhaseFailures` — Startup phase completed with one or more task failures.
- **LifecycleTaskTimeout** `LifecycleTaskTimeout` — A lifecycle task exceeded its configured timeout.
- **LifecycleRestartAfterFailure** `LifecycleRestartAfterFailure` — A host whose startup failed was started again.
- **CoreSingletonViolation** `CoreSingletonViolation` — Multiple Seedcord instances were created simultaneously.
- **CorePluginAfterInit** `CorePluginAfterInit` — Plugins cannot be mutated after the core has finished initializing.
- **CorePluginKeyExists** `CorePluginKeyExists` — A plugin tried to register with a key that already exists.
- **CoreBotRoleMissing** `CoreBotRoleMissing` — Bot role lookup failed within the provided guild.
- **CoreControllerPathMissing** `CoreControllerPathMissing` — A bot controller was constructed without its required handlers directory.
- **CoreDirectoryImportFailed** `CoreDirectoryImportFailed` — A file in a scanned directory threw while being imported.
- **CoreDirectoryUnreadable** `CoreDirectoryUnreadable` — A scanned directory could not be read.
- **CorePluginReservedChannel** `CorePluginReservedChannel` — A plugin was attached under a key the framework logs on.
- **CoreApplicationUnavailable** `CoreApplicationUnavailable` — The application id was read before startup resolved it.
- **CoreAccessorUnresolved** `CoreAccessorUnresolved` — A generated accessor was read before startup resolved its values.
- **CoreLifecycleUnavailable** `CoreLifecycleUnavailable` — A startup or shutdown task was added to a core built by `createSeedcord`.
- **CoreBusEmitUnavailable** `CoreBusEmitUnavailable` — `emit` was called on the bus. It reaches listeners and skips every subscriber.
- **DecoratorInteractionEventFilter** `DecoratorInteractionEventFilter` — Interaction middleware decorated with disallowed event filters.
- **DecoratorCommandAlreadyRegistered** `DecoratorCommandAlreadyRegistered` — A command decorator attempted to re-register an existing command scope.
- **DecoratorCommandGlobalWithGuilds** `DecoratorCommandGlobalWithGuilds` — A global command decorator specified guild IDs, which is not allowed.
- **DecoratorCommandGuildWithoutGuilds** `DecoratorCommandGuildWithoutGuilds` — A guild command decorator omitted the required guild ID list.
- **DecoratorInvalidMiddlewarePriority** `DecoratorInvalidMiddlewarePriority` — Middleware priority provided by the decorator was not a finite number.
- **DecoratorWebhookUrlMissing** `DecoratorWebhookUrlMissing` — A WebhookLog subclass is missing its `@WebhookUrl` decorator.
- **InteractionDuplicateRoute** `InteractionDuplicateRoute` — Two interaction handlers registered the same route within a scope.
- **InteractionDuplicateMiddleware** `InteractionDuplicateMiddleware` — Two different interaction middleware classes share a class name.
- **InteractionRouteExportMissing** `InteractionRouteExportMissing` — A route manifest row gives an export name its module does not have.
- **SubscriberRouteNotASubscriber** `SubscriberRouteNotASubscriber` — A subscriber manifest row specifies an export that does not extend `Subscriber`.
- **RouteModuleLoadFailed** `RouteModuleLoadFailed` — A manifest row's module threw while importing.
- **ReplyIllegalAckState** `ReplyIllegalAckState` — A reply method was called in an ack state where it is illegal.
- **ReplyComponentSerialization** `ReplyComponentSerialization` — A reply component failed to serialize to raw API data.
- **ReplyForeignEditTarget** `ReplyForeignEditTarget` — edit() was passed a message the interaction did not send.
- **ReplyUpdateWithoutSource** `ReplyUpdateWithoutSource` — update() or deferUpdate() was called on a modal with no source message.
- **ReplyCallbackMissingMessage** `ReplyCallbackMissingMessage` — A withResponse interaction callback returned no created message.
- **CustomIdInvalidPrefix** `CustomIdInvalidPrefix` — A customId definition prefix contains a reserved character (a colon or a control char).
- **CustomIdReservedFieldName** `CustomIdReservedFieldName` — A customId field name is integer-like, which JS would silently reorder.
- **CustomIdEmptyChoices** `CustomIdEmptyChoices` — A oneOf() field was declared with no choices.
- **CustomIdInvalidBounds** `CustomIdInvalidBounds` — An int() field was declared with min greater than max.
- **CustomIdValueOutOfRange** `CustomIdValueOutOfRange` — A value passed to encode() is outside its field's allowed range.
- **CustomIdWireTooLong** `CustomIdWireTooLong` — An encoded customId exceeds Discord's 100-character limit.
- **CustomIdDuplicateFieldName** `CustomIdDuplicateFieldName` — A field name is declared more than once in the same customId chain.
- **CustomIdHandlerRouteMissing** `CustomIdHandlerRouteMissing` — A component handler is missing its route decorator (@ButtonRoute / @ModalRoute / @SelectMenuRoute).
- **CustomIdMatchArmMissing** `CustomIdMatchArmMissing` — match() received a decoded route with no matching arm.
- **SlashMatchArmMissing** `SlashMatchArmMissing` — A slash handler's match() has no arm for the command route that fired.
- **AutocompleteMatchArmMissing** `AutocompleteMatchArmMissing` — An autocomplete handler's match() has no arm for the focused field that fired.
- **EventMatchArmMissing** `EventMatchArmMissing` — An event handler's match() has no arm for the event name that fired.
- **EventMiddlewareNameUnavailable** `EventMiddlewareNameUnavailable` — Event middleware read `this.eventName` but was constructed without a fired event name.
- **AutocompleteNoFocusedOption** `AutocompleteNoFocusedOption` — An autocomplete payload carried no focused option.
- **ContextMenuMatchArmMissing** `ContextMenuMatchArmMissing` — A context menu handler's match() has no arm for the command name that fired.
- **ModalFieldNotFound** `ModalFieldNotFound` — No field in the submitted modal carries the requested custom id.
- **ModalFieldWrongKind** `ModalFieldWrongKind` — A modal field getter was called on a field of another kind.
- **ModalFieldEmpty** `ModalFieldEmpty` — Nothing was picked in a modal field read as required.
- **ModalFieldChannelType** `ModalFieldChannelType` — A channel select field picked a channel outside the types getSelectedChannels() allows.
- **CustomIdWireStale** `CustomIdWireStale` — A customId was minted under an older shape of the same definition.
- **CustomIdWireInvalid** `CustomIdWireInvalid` — A customId wire is corrupt, truncated, or was minted by a different definition.
- **GateInvalidCooldownDuration** `GateInvalidCooldownDuration` — A Cooldown gate was given a duration string that is not a well-formed positive duration.
- **PaginationInvalidPerPage** `PaginationInvalidPerPage` — A paginator source was given a perPage that is not a positive integer.
- **PaginationTooManyControls** `PaginationTooManyControls` — A control row was assembled with more than the five buttons Discord allows.
- **PaginationEmptyControls** `PaginationEmptyControls` — A control row was assembled with no controls.
- **PaginationDuplicateControls** `PaginationDuplicateControls` — A control row repeats the same control, which would collide the custom_ids.
- **ColorUnresolvable** `ColorUnresolvable` — A color value could not be resolved to a Discord color integer.
- **ColorOutOfRange** `ColorOutOfRange` — A resolved color fell outside Discord's 0x000000 to 0xffffff range.
- **PluginOptionsRejected** `PluginOptionsRejected` — A plugin's constructor rejected its options through `rejectOptions`.
- **PluginDisposeFailures** `PluginDisposeFailures` — Two or more plugins threw while disposing.
- **PluginInvalidLifecycleTimeout** `PluginInvalidLifecycleTimeout` — A plugin declared a lifecycle timeout that is not a positive, finite number of milliseconds.
- **PluginMongooseServiceDecoratorMissing** `PluginMongooseServiceDecoratorMissing` — Mongoose service class is missing the `@RegisterMongooseService` decorator.
- **PluginMongooseConnectionFailed** `PluginMongooseConnectionFailed` — Mongoose client failed to establish a connection.
- **PluginMongooseDisconnectFailed** `PluginMongooseDisconnectFailed` — Mongoose client failed to disconnect cleanly during shutdown.
- **PluginMongooseServicesNotReady** `PluginMongooseServicesNotReady` — Mongoose `services` was accessed before the plugin finished initializing.
- **PluginMongooseModelCreationFailed** `PluginMongooseModelCreationFailed` — Mongoose rejected the model, usually a duplicate model name or an absent schema.
- **PluginMongooseModelNameMissing** `PluginMongooseModelNameMissing` — A mongoose service was registered with an empty model name override.
- **PluginKyselyServiceDecoratorMissing** `PluginKyselyServiceDecoratorMissing` — Kysely service class is missing the `@RegisterKyselyService` decorator.
- **PluginKyselyServiceTableMissing** `PluginKyselyServiceTableMissing` — Kysely service class is missing its table metadata.
- **PluginKyselyInvalidStepCount** `PluginKyselyInvalidStepCount` — Migration manager received an invalid step count.
- **PluginKyselyUnknownDirection** `PluginKyselyUnknownDirection` — Migration direction was not recognized.
- **PluginKyselyUnresolvedMigrationsPath** `PluginKyselyUnresolvedMigrationsPath` — Provided migrations path could not be resolved.
- **PluginKyselyNoMigrationFiles** `PluginKyselyNoMigrationFiles` — No migration files were found for execution.
- **PluginKyselyInvalidMigrationModule** `PluginKyselyInvalidMigrationModule` — A migration module failed to export the expected functions.
- **PluginKyselyNonErrorFailure** `PluginKyselyNonErrorFailure` — An arbitrary (non-Error) failure was reported by a migration.
- **PluginKyselyDisconnectFailed** `PluginKyselyDisconnectFailed` — Postgres pool failed to close cleanly during shutdown.
- **PluginKyselyServicesNotReady** `PluginKyselyServicesNotReady` — Kysely `services` was accessed before the plugin finished initializing.
- **PluginKyselyConnectionFailed** `PluginKyselyConnectionFailed` — Postgres pool failed to establish a connection.
- **PluginKyselyBootstrapFailed** `PluginKyselyBootstrapFailed` — Bootstrapper failed to ensure the target Postgres database exists.
- **CliConfigInvalidExport** `CliConfigInvalidExport` — Config file default export was not an object.
- **CliConfigMissingInstance** `CliConfigMissingInstance` — Config is missing the required instance string.
- **CliConfigNotFound** `CliConfigNotFound` — Unable to locate a Seedcord config file.
- **CliEntryNotFound** `CliEntryNotFound` — CLI entry file does not exist.
- **CliTsxImportFailed** `CliTsxImportFailed` — tsx failed to import the provided entry file.
- **CliImportFailed** `CliImportFailed` — Native import and jiti fallback both failed.
- **CliInstanceInvalid** `CliInstanceInvalid` — Seedcord instance export is missing a start() method.
- **CliStartFailed** `CliStartFailed` — Seedcord instance threw during startup.
- **CliConfigMissingEntry** `CliConfigMissingEntry` — Config is missing the required entry string.
- **CliConfigEntryOutsideRoot** `CliConfigEntryOutsideRoot` — Entry file must be inside the configured root directory.
- **CliBuildTsconfigNotFound** `CliBuildTsconfigNotFound` — Unable to locate a TypeScript config file for builds.
- **CliBuildFailed** `CliBuildFailed` — TypeScript reported diagnostics during emit.
- **CliBootstrapWriteFailed** `CliBootstrapWriteFailed` — Unable to write the generated bootstrap file.
- **CliCodegenDuplicateRoute** `CliCodegenDuplicateRoute` — Two commands resolve to the same slash route during codegen.
- **CliCodegenCommandsDirUnreadable** `CliCodegenCommandsDirUnreadable` — The commands directory could not be read during codegen.
- **CliCodegenDuplicateContextMenu** `CliCodegenDuplicateContextMenu` — Two context-menu commands of the same kind share a name during codegen.
- **CliCleanAppFetchFailed** `CliCleanAppFetchFailed` — Could not resolve the application from the bot token during `commands --clean`.
- **CliCleanNoGuilds** `CliCleanNoGuilds` — `commands --clean` ran with neither --guild nor --all-guilds.
- **CliCleanPurgeAllGuilds** `CliCleanPurgeAllGuilds` — `commands --clean` combined --purge with --all-guilds, which would wipe every guild.
- **CliCancelled** `CliCancelled` — An interactive prompt was cancelled (Ctrl-C), so the command aborts without changes.
- **CliCleanLargeBotUnconfirmed** `CliCleanLargeBotUnconfirmed` — `commands --clean --all-guilds` matched more guilds than the safety threshold without `--yes`.
- **CliCleanApplyNeedsYes** `CliCleanApplyNeedsYes` — `commands --clean --apply` ran in a non-interactive environment without `--yes`, where it cannot prompt.
- **CliTunnelUrlUnavailable** `CliTunnelUrlUnavailable` — The cloudflared metrics server never reported a quick-tunnel hostname.
- **CliTunnelNotVerified** `CliTunnelNotVerified` — Discord rejected the tunnel URL as an interactions endpoint.
- **CliTunnelUnreachable** `CliTunnelUnreachable` — The tunnel URL never answered its health probe.
- **CliConfigInvalidField** `CliConfigInvalidField` — A config field is present with the wrong shape.
- **CliCodegenCommandConstructorThrew** `CliCodegenCommandConstructorThrew` — A class carrying `@RegisterCommand` threw while codegen constructed it.
- **CreateCancelled** `CreateCancelled` — A create prompt was cancelled (Ctrl-C), and nothing has been written yet.
- **CreateFlagNotApplicable** `CreateFlagNotApplicable` — A flag supplied an answer for a question the earlier answers skip.
- **CreateInvalidAnswer** `CreateInvalidAnswer` — A flag carried a value its question rejects.
- **CreateBadUsage** `CreateBadUsage` — The command line did not parse.
- **CreateTargetNotEmpty** `CreateTargetNotEmpty` — The target path already holds something.
- **CreateStepFailed** `CreateStepFailed` — A command the scaffolder shelled out to exited non-zero.
