# SeedcordErrorCode

`enum` in `errors` · v0.15.1

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

All Seedcord error codes.

```ts
enum SeedcordErrorCode
```

## Members

- **ConfigEmojiUnresolved** `ConfigEmojiUnresolved` — Two or more configured emojis failed to resolve at startup.
- **ConfigEmojiInvalid** `ConfigEmojiInvalid` — A configured emoji is neither a name nor a `[name, guildId]` pair.
- **ConfigEmojiNotFound** `ConfigEmojiNotFound` — The application or guild a configured emoji points at has no emoji with that name.
- **ConfigEmojiSourceUnreadable** `ConfigEmojiSourceUnreadable` — Reading the emojis of the application or guild a configured emoji points at failed.
- **ConfigWebhookNotFound** `ConfigWebhookNotFound` — Discord has no webhook at a configured URL, because it was deleted or the id or token is wrong.
- **ConfigMissingEnv** `ConfigMissingEnv` — A required environment variable is unset.
- **ConfigInvalidEnv** `ConfigInvalidEnv` — An environment variable is set to a value seedcord cannot use.
- **MissingGuildsIntent** `MissingGuildsIntent` — A command that runs in guilds is registered without the `Guilds` intent, so discord.js caches no guild.
- **UnsupportedRuntimeVersion** `UnsupportedRuntimeVersion` — The running Node or Bun is older than the range seedcord declares in `engines`.
- **ConfigEdgeRestSweeper** `ConfigEdgeRestSweeper` — An edge config sets a REST sweeper interval.
- **PortInUse** `PortInUse` — Another process already listens on the port seedcord tries to listen on.
- **LifecycleTaskChangeRejected** `LifecycleTaskChangeRejected` — A startup task was added or removed while startup ran, or added after it finished.
- **LifecycleUnknownPhase** `LifecycleUnknownPhase` — A lifecycle call got a phase that is not a member of `StartupPhase` or `ShutdownPhase`.
- **LifecyclePhaseFailures** `LifecyclePhaseFailures` — One or more tasks failed during a startup phase.
- **LifecycleTaskTimeout** `LifecycleTaskTimeout` — A lifecycle task ran past its timeout.
- **LifecycleRestartAfterFailure** `LifecycleRestartAfterFailure` — A host whose startup failed was started again.
- **LifecycleInvalidTimeout** `LifecycleInvalidTimeout` — A shutdown deadline or a plugin's lifecycle timeout is zero, negative, or not finite.
- **CoreSingletonViolation** `CoreSingletonViolation` — A second Seedcord instance was constructed while one already exists.
- **CorePluginAfterInit** `CorePluginAfterInit` — A plugin was attached after the bot started.
- **CorePluginKeyExists** `CorePluginKeyExists` — A plugin was attached under a key another plugin already uses.
- **CoreBotRoleMissing** `CoreBotRoleMissing` — The bot's own role is missing from the guild's role cache.
- **CoreControllerPathMissing** `CoreControllerPathMissing` — A bot controller was constructed without the folder that holds its handlers.
- **CoreImportFailed** `CoreImportFailed` — seedcord could not import a file in the bot or in the CLI.
- **CorePathUnreadable** `CorePathUnreadable` — A file or folder that seedcord reads could not be read.
- **CorePluginReservedChannel** `CorePluginReservedChannel` — A plugin was attached under a key that the framework logs on.
- **CoreApplicationUnavailable** `CoreApplicationUnavailable` — The application id was read before startup resolved it.
- **CoreAccessorUnresolved** `CoreAccessorUnresolved` — A generated accessor like `Emojis` or `Commands` was read for a key that has no value yet.
- **CoreLifecycleUnavailable** `CoreLifecycleUnavailable` — A shutdown task was added on an edge bot. Cloudflare stops an isolate without a shutdown hook.
- **CoreBusEmitUnavailable** `CoreBusEmitUnavailable` — `emit` was called on the bus. It calls the listeners and skips every subscriber.
- **CoreCommandGuildsEmpty** `CoreCommandGuildsEmpty` — A command registers to the `'config'` guilds while `commands.guilds` is empty.
- **CoreCommandGuildDeployFailed** `CoreCommandGuildDeployFailed` — Discord refused the command deploy for one guild.
- **CorePluginGroupTaken** `CorePluginGroupTaken` — A plugin was attached under a group name the bot already uses.
- **CorePluginKeyHoldsGroup** `CorePluginKeyHoldsGroup` — A plugin was attached at a name that holds a group of plugins.
- **CorePluginKeyMalformed** `CorePluginKeyMalformed` — A plugin key is empty, has an empty part, or has more than one dot.
- **CorePluginFromOtherCore** `CorePluginFromOtherCore` — An attached plugin extends the `Plugin` class of a different copy of `@seedcord/core`.
- **CorePathOutsideRoot** `CorePathOutsideRoot` — A folder or the `build.start` file is outside `root`.
- **CorePluginScopeMismatch** `CorePluginScopeMismatch` — A plugin declares a transport or runtime the bot doesn't use.
- **CoreFetchBeforeStart** `CoreFetchBeforeStart` — A node http bot got a request through `fetch` before `start()` was called.
- **CoreEdgeUnbuilt** `CoreEdgeUnbuilt` — An edge worker got a POST without the ids that `seedcord build` writes into it.
- **CoreDirectoryRootUnknown** `CoreDirectoryRootUnknown` — A relative folder was read in a process that never got the bot's `root`.
- **CoreCommandGlobalDeployFailed** `CoreCommandGlobalDeployFailed` — Discord refused the global command deploy.
- **CoreDirectoryNotBuilt** `CoreDirectoryNotBuilt` — A built bot read a folder that did not exist under `root` when `seedcord build` ran.
- **CoreWebhookUrlInvalid** `CoreWebhookUrlInvalid` — A webhook sender was constructed with a URL that is not a Discord webhook URL.
- **CoreDiscordReadFailed** `CoreDiscordReadFailed` — Reading from Discord with `DISCORD_BOT_TOKEN` failed, like the application, its public key, or its commands.
- **CoreDuplicateName** `CoreDuplicateName` — Two routes, commands, migrations, or customId fields have the same name, or two code files build to the same file.
- **CoreVitePluginThrew** `CoreVitePluginThrew` — A Vite plugin from `vitePlugins` threw while Vite started or loaded a file, or failed when seedcord called `vitePlugins`.
- **CoreDirectoryNotListed** `CoreDirectoryNotListed` — `readFiles` read a folder that `files` in `seedcord.config.ts` leaves out.
- **CoreDirectorySkipped** `CoreDirectorySkipped` — A folder is inside one that `seedcord build` skips, like a dot-folder, `node_modules`, `outDir` or the logs folder.
- **CoreKvKeysUnsupported** `CoreKvKeysUnsupported` — `collection.entries()` ran on a Keyv store in `config.kv` that can't list its keys.
- **CorePluginKvOutsideAttach** `CorePluginKvOutsideAttach` — A plugin built with `new` outside `attach()` read `this.kv`.
- **CoreKvDriverFailed** `CoreKvDriverFailed` — The driver in `config.kv` threw, or reported a write as failed.
- **CoreBotMemberMissing** `CoreBotMemberMissing` — The bot's own member is missing from the guild's member cache.
- **CoreBuiltModuleRanDirectly** `CoreBuiltModuleRanDirectly` — A module from a build read its path, but the build's `index.mjs` didn't run first.
- **CoreKvUnserializable** `CoreKvUnserializable` — `JSON.stringify` threw on a record passed to a kv collection's `set()` or `update()`, like one with a circular reference.
- **DecoratorCommandAlreadyRegistered** `DecoratorCommandAlreadyRegistered` — A command class carries `@RegisterCommand` twice.
- **DecoratorCommandGlobalWithGuilds** `DecoratorCommandGlobalWithGuilds` — `@RegisterCommand('global')` was given guild ids.
- **DecoratorCommandGuildWithoutGuilds** `DecoratorCommandGuildWithoutGuilds` — `@RegisterCommand('guild')` was given no guild ids.
- **DecoratorInvalidMiddlewarePriority** `DecoratorInvalidMiddlewarePriority` — A middleware decorator sets a priority that is not a finite number.
- **DecoratorWebhookUrlMissing** `DecoratorWebhookUrlMissing` — A `WebhookLog` subclass is missing its `@WebhookUrl` decorator.
- **DecoratorEmptyMiddlewareFilter** `DecoratorEmptyMiddlewareFilter` — A middleware decorator got an empty filter array.
- **DecoratorDuplicateKey** `DecoratorDuplicateKey` — `@Subscribe`, `@RegisterEvent`, or a component route decorator lists the same key or customId prefix twice.
- **ReplyIllegalAckState** `ReplyIllegalAckState` — A reply method was called in an ack state where Discord rejects it.
- **ReplyComponentSerialization** `ReplyComponentSerialization` — A reply component threw while seedcord serialized it.
- **ReplyForeignEditTarget** `ReplyForeignEditTarget` — `edit()` got a message that the interaction did not send.
- **ReplyUpdateWithoutSource** `ReplyUpdateWithoutSource` — `update()` or `deferUpdate()` was called on a modal that has no source message.
- **ReplyCallbackMissingMessage** `ReplyCallbackMissingMessage` — Discord's response to a `withResponse` callback has no message in it.
- **CustomIdInvalidPrefix** `CustomIdInvalidPrefix` — A customId prefix is empty, or holds a colon or a control character.
- **CustomIdReservedFieldName** `CustomIdReservedFieldName` — A customId field name looks like an integer. JS reorders integer keys.
- **CustomIdEmptyChoices** `CustomIdEmptyChoices` — A `oneOf()` or `someOf()` field was declared with no choices.
- **CustomIdInvalidBounds** `CustomIdInvalidBounds` — An `int()` field was declared with a min greater than its max.
- **CustomIdValueRejected** `CustomIdValueRejected` — `encode()` got a value that doesn't fit its field.
- **CustomIdWireTooLong** `CustomIdWireTooLong` — An encoded customId is longer than the 100 characters Discord allows.
- **CustomIdHandlerRouteMissing** `CustomIdHandlerRouteMissing` — A component handler is missing the route decorator that matches its base.
- **MatchCaseMissing** `MatchCaseMissing` — A handler's `match()` doesn't have a case for the current route, field, event, or command.
- **AutocompleteNoFocusedOption** `AutocompleteNoFocusedOption` — Discord sent an autocomplete payload with no focused option.
- **ModalFieldNotFound** `ModalFieldNotFound` — The submitted modal has no field with the requested custom id.
- **ModalFieldWrongKind** `ModalFieldWrongKind` — A modal field getter was called on a field of another kind.
- **ModalFieldEmpty** `ModalFieldEmpty` — A modal field read as required has nothing picked.
- **ModalFieldChannelType** `ModalFieldChannelType` — A channel select returned a channel whose type the `getSelectedChannels()` call excludes.
- **CustomIdWireStale** `CustomIdWireStale` — A customId was encoded under an older shape of the same definition.
- **CustomIdWireInvalid** `CustomIdWireInvalid` — A customId is corrupt, truncated, or was encoded by a different definition.
- **DispatchStateMissing** `DispatchStateMissing` — `dispatch.require()` was called for a key that nothing set on this dispatch.
- **GateInvalidCooldownDuration** `GateInvalidCooldownDuration` — A `Cooldown` gate got a duration that doesn't parse, or one of zero or less.
- **PaginationInvalidPerPage** `PaginationInvalidPerPage` — A paginator got a `perPage` that is not a positive integer.
- **PaginationControlCount** `PaginationControlCount` — A control row has no controls, or more than the five buttons Discord allows.
- **PaginationDuplicateControls** `PaginationDuplicateControls` — A control row lists the same control twice. Its two buttons would share a custom_id.
- **ColorUnresolvable** `ColorUnresolvable` — A color value doesn't resolve to a Discord color integer.
- **ColorOutOfRange** `ColorOutOfRange` — A resolved color is outside Discord's range of 0x000000 to 0xffffff.
- **UtilTableOptionInvalid** `UtilTableOptionInvalid` — `renderTable` got a `maxWidth` or `padding` outside the values it accepts.
- **UtilUnhandledUnionMember** `UtilUnhandledUnionMember` — `assertNever` ran with a value that its types ruled out.
- **LoggerFileNameHasFolder** `LoggerFileNameHasFolder` — `WinstonFileSink` got a `filename` with a folder in it. File logs always go in the logs folder.
- **PluginOptionsRejected** `PluginOptionsRejected` — A plugin's constructor called `rejectOptions` on the options it got.
- **PluginDisposeFailures** `PluginDisposeFailures` — Two or more plugins threw while disposing.
- **PluginServiceDecoratorMissing** `PluginServiceDecoratorMissing` — A plugin service class is missing the decorator that registers it.
- **PluginServicesNotReady** `PluginServicesNotReady` — A plugin's `services` was read before the plugin finished `init()`.
- **PluginConnectionFailed** `PluginConnectionFailed` — A plugin could not connect to the service it wraps.
- **PluginDisconnectFailed** `PluginDisconnectFailed` — A plugin could not close its connection cleanly during shutdown.
- **PluginMongooseModelCreationFailed** `PluginMongooseModelCreationFailed` — Mongoose threw while building a model, usually for a duplicate model name or a missing schema.
- **PluginMongooseModelNameMissing** `PluginMongooseModelNameMissing` — A mongoose service was registered with an empty model name.
- **PluginKyselyServiceTableMissing** `PluginKyselyServiceTableMissing` — A kysely service class has no table.
- **PluginKyselyInvalidStepCount** `PluginKyselyInvalidStepCount` — A migration run got a step count that is not a non-negative integer.
- **PluginKyselyUnknownDirection** `PluginKyselyUnknownDirection` — A migration run got a direction other than `up` or `down`.
- **PluginKyselyInvalidMigrationModule** `PluginKyselyInvalidMigrationModule` — A file in the migrations folder has no `up` function.
- **PluginKyselyNonErrorFailure** `PluginKyselyNonErrorFailure` — A migration failed with a thrown value that is not an `Error`.
- **PluginKyselyBootstrapFailed** `PluginKyselyBootstrapFailed` — Creating the target Postgres database failed.
- **CliCancelled** `CliCancelled` — Someone pressed Ctrl-C at a prompt in `seedcord` or `create-seedcord`.
- **CliConfigInvalidExport** `CliConfigInvalidExport` — The seedcord config file's default export is not an object.
- **CliConfigNotFound** `CliConfigNotFound` — No seedcord config file exists in the folder the CLI searched.
- **CliFileNotFound** `CliFileNotFound` — The file that `instance` or `build.start` in the seedcord config points at does not exist.
- **CliInstanceInvalid** `CliInstanceInvalid` — The instance file's default export is not a constructed `Seedcord`.
- **CliStartFailed** `CliStartFailed` — The bot threw during startup.
- **CliTsconfigNotFound** `CliTsconfigNotFound` — `build.tsconfig` points at a missing file, or it is unset and the config's folder has no `tsconfig.json`.
- **CliBuildFailed** `CliBuildFailed` — `seedcord build` found type errors.
- **CliNoScopeGiven** `CliNoScopeGiven` — `commands clean` or `commands purge` ran without a flag that picks where it deletes.
- **CliTunnelUrlUnavailable** `CliTunnelUrlUnavailable` — cloudflared 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 field in the seedcord config is missing or has the wrong shape.
- **CliCommandConstructorThrew** `CliCommandConstructorThrew` — A class carrying `@RegisterCommand` threw while seedcord constructed it.
- **CliBundleFailed** `CliBundleFailed` — Vite threw while bundling the bot.
- **CliConfigOutDirDeletesRoot** `CliConfigOutDirDeletesRoot` — `build.outDir` is `root` or a folder that contains it.
- **CliDependencyMissing** `CliDependencyMissing` — The project is missing a dev dependency the CLI runs, like `typescript` or `@cloudflare/vite-plugin`.
- **CliBuildOutDirNotEmpty** `CliBuildOutDirNotEmpty` — `build.outDir` already has other files in it.
- **CliProblems** `CliProblems` — One CLI step found two or more problems. Each one is in the error's `errors`.
- **CliCodegenOutOfDate** `CliCodegenOutOfDate` — `seedcord codegen --check` found the committed augmentations out of date.
- **CliPathHasHash** `CliPathHasHash` — A file or folder in the project has a `#` in its path.
- **CliEdgeWithoutWorkerdCondition** `CliEdgeWithoutWorkerdCondition` — An edge bot's tsconfig is missing the `workerd` condition.
- **CliWorkerdConditionWithoutCloudflareConfig** `CliWorkerdConditionWithoutCloudflareConfig` — A bot with no `cloudflare.config.ts` sets the `workerd` condition in its tsconfig.
- **CliConfigFileUnreadable** `CliConfigFileUnreadable` — TypeScript could not read the project's tsconfig, or Cloudflare's config loader could not read `cloudflare.config.ts`.
- **CliTypescriptNotStarted** `CliTypescriptNotStarted` — The CLI could not start the TypeScript compiler.
- **CliConfigFieldUnused** `CliConfigFieldUnused` — A config file sets a field this bot can't set, like `entrypoint` in an edge bot's `cloudflare.config.ts`.
- **CliEdgeCompatDateTooOld** `CliEdgeCompatDateTooOld` — An edge bot's `compatibilityDate` is older than Cloudflare's Node compat default, and no flag turns it on.
- **CliEdgeNodeCompatOff** `CliEdgeNodeCompatOff` — An edge bot sets `no_nodejs_compat`.
- **CliEdgeBootFailed** `CliEdgeBootFailed` — The build could not start the edge worker in workerd.
- **CliEdgeRootHoldsConfig** `CliEdgeRootHoldsConfig` — An edge bot's `root` holds its seedcord config.
- **CliEdgeCommandsNotDeployed** `CliEdgeCommandsNotDeployed` — An edge build found commands in code that have no deployed id on Discord.
- **CliDevRuntimeNotRunning** `CliDevRuntimeNotRunning` — Something called the dev runtime before `start()` finished or after `stop()`. This is a bug in seedcord.
- **CliDeployNoCommandsFolder** `CliDeployNoCommandsFolder` — `seedcord commands deploy` ran on a bot whose `commands.path` is `null`.
- **CliDeployNeedsYes** `CliDeployNeedsYes` — `seedcord commands deploy` ran without `--yes` where it cannot ask first.
- **CliCommandNotACommand** `CliCommandNotACommand` — A class carrying `@RegisterCommand` builds a component that is not a command or a context menu.
- **CliCommandsNotDeleted** `CliCommandsNotDeleted` — `seedcord commands clean` or `purge` could not delete some of the commands it picked.
- **CliEdgeOnBun** `CliEdgeOnBun` — The CLI ran on Bun for an edge bot.
- **CliEdgeNoWorker** `CliEdgeNoWorker` — An edge bot's `cloudflare.config.ts` sets no `worker`.
- **CliNotProjectInstall** `CliNotProjectInstall` — The running `seedcord` is a different install from the project's own.
- **CliViteEnvironmentMissing** `CliViteEnvironmentMissing` — Vite's environments leave out the one seedcord runs the bot in.
- **CliListedFolderUnusable** `CliListedFolderUnusable` — A folder that `files` in `seedcord.config.ts` lists is missing or is a file.
- **CliDevAlreadyRunning** `CliDevAlreadyRunning` — Another `seedcord dev` already runs a bot on the same Discord application.
- **CliDevLockFolderNotOwned** `CliDevLockFolderNotOwned` — The folder that holds the dev session locks belongs to another user.
- **CliPluginCodegenThrew** `CliPluginCodegenThrew` — A plugin's `codegen()` threw.
- **CliPluginCodegenNoId** `CliPluginCodegenNoId` — A plugin class with a `codegen()` is missing its `static readonly id`.
- **CliPluginCodegenValue** `CliPluginCodegenValue` — A plugin's `codegen()` returned a value that codegen can't write as a type.
- **CliPluginCodegenConflict** `CliPluginCodegenConflict` — Two attachments of one plugin class returned different values at one key from `codegen()`.
- **CliAskBadQuestion** `CliAskBadQuestion` — The text passed to `seedcord ask` isn't a question the guide search accepts.
- **CliAskHasToWait** `CliAskHasToWait` — The guide search refused `seedcord ask` until a search limit resets.
- **CliAskFailed** `CliAskFailed` — The guide search failed for a reason other than a search limit.
- **CreateFlagNotApplicable** `CreateFlagNotApplicable` — A flag answers a question that the earlier answers skip.
- **CreateInvalidAnswer** `CreateInvalidAnswer` — A flag has a value its question rejects.
- **CreateBadUsage** `CreateBadUsage` — The command line did not parse.
- **CreateTargetNotEmpty** `CreateTargetNotEmpty` — The target path already has files in it.
- **CreateStepFailed** `CreateStepFailed` — A command that create-seedcord ran exited non-zero.
- **MakeInvalidName** `MakeInvalidName` — The name given to `seedcord make` can't become a file name.
- **MakeImportOfUnmatched** `MakeImportOfUnmatched` — A template calls `importOf` on a folder that doesn't hold exactly one template file.
- **MakeValueUsedTwoWays** `MakeValueUsedTwoWays` — A template uses one value as two of text, a list, and an entry with fields.
- **MakeTemplateFailed** `MakeTemplateFailed` — Handlebars could not parse or render a template file.
- **MakeLookupDynamicKey** `MakeLookupDynamicKey` — A template calls `lookup` with a key that isn't quoted text.
- **MakeNeedsTerminal** `MakeNeedsTerminal` — `seedcord make` ran without a terminal to ask its questions in.
- **MakeNoTemplates** `MakeNoTemplates` — `seedcord make` found no templates in the bot or its plugins.
- **MakePathTaken** `MakePathTaken` — A path `seedcord make` would write to is taken, by a file on disk or by another file of the same template.
- **MakePartialCallsItself** `MakePartialCallsItself` — A template's partial calls itself, so `seedcord make` can't tell how many levels to ask for.
