@seedcord/errors 0.15.0-next.2 → 0.15.0-next.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{SeedcordError-DSbDib43.d.mts → ErrorCodes-BfhJtzPM.d.mts} +8 -297
- package/dist/ErrorCodes.d.mts +2 -0
- package/dist/ErrorCodes.mjs +347 -0
- package/dist/ErrorCodes.mjs.map +1 -0
- package/dist/SeedcordError-ChZj9C4u.d.mts +301 -0
- package/dist/{SeedcordError-IKte_mLl.mjs → SeedcordError-DMuI3AbC.mjs} +7 -341
- package/dist/SeedcordError-DMuI3AbC.mjs.map +1 -0
- package/dist/index.d.mts +2 -1
- package/dist/index.mjs +3 -2
- package/dist/index.mjs.map +1 -1
- package/dist/internal.index.d.mts +2 -1
- package/dist/internal.index.mjs +2 -1
- package/dist/internal.index.mjs.map +1 -1
- package/package.json +7 -1
- package/dist/SeedcordError-IKte_mLl.mjs.map +0 -1
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
//#region src/ErrorCodes.ts
|
|
2
|
+
/**
|
|
3
|
+
* All Seedcord error codes.
|
|
4
|
+
*/
|
|
5
|
+
let SeedcordErrorCode = /* @__PURE__ */ function(SeedcordErrorCode) {
|
|
6
|
+
/** Two or more configured emojis failed to resolve at startup. */
|
|
7
|
+
SeedcordErrorCode[SeedcordErrorCode["ConfigEmojiUnresolved"] = 1001] = "ConfigEmojiUnresolved";
|
|
8
|
+
/** A configured emoji is neither a name nor a `[name, guildId]` pair. */
|
|
9
|
+
SeedcordErrorCode[SeedcordErrorCode["ConfigEmojiInvalid"] = 1002] = "ConfigEmojiInvalid";
|
|
10
|
+
/** The application or guild a configured emoji points at has no emoji with that name. */
|
|
11
|
+
SeedcordErrorCode[SeedcordErrorCode["ConfigEmojiNotFound"] = 1003] = "ConfigEmojiNotFound";
|
|
12
|
+
/** Reading the emojis of the application or guild a configured emoji points at failed. */
|
|
13
|
+
SeedcordErrorCode[SeedcordErrorCode["ConfigEmojiSourceUnreadable"] = 1004] = "ConfigEmojiSourceUnreadable";
|
|
14
|
+
/** Discord has no webhook at a configured URL, because it was deleted or the id or token is wrong. */
|
|
15
|
+
SeedcordErrorCode[SeedcordErrorCode["ConfigWebhookNotFound"] = 1005] = "ConfigWebhookNotFound";
|
|
16
|
+
/** A required environment variable is unset. */
|
|
17
|
+
SeedcordErrorCode[SeedcordErrorCode["ConfigMissingEnv"] = 1006] = "ConfigMissingEnv";
|
|
18
|
+
/** An environment variable is set to a value seedcord cannot use. */
|
|
19
|
+
SeedcordErrorCode[SeedcordErrorCode["ConfigInvalidEnv"] = 1007] = "ConfigInvalidEnv";
|
|
20
|
+
/** A command that runs in guilds is registered without the `Guilds` intent, so discord.js caches no guild. */
|
|
21
|
+
SeedcordErrorCode[SeedcordErrorCode["MissingGuildsIntent"] = 1008] = "MissingGuildsIntent";
|
|
22
|
+
/** The running Node or Bun is older than the range seedcord declares in `engines`. */
|
|
23
|
+
SeedcordErrorCode[SeedcordErrorCode["UnsupportedRuntimeVersion"] = 1009] = "UnsupportedRuntimeVersion";
|
|
24
|
+
/** An edge config sets a REST sweeper interval. */
|
|
25
|
+
SeedcordErrorCode[SeedcordErrorCode["ConfigEdgeRestSweeper"] = 1010] = "ConfigEdgeRestSweeper";
|
|
26
|
+
/** Another process already listens on the port seedcord tries to listen on. */
|
|
27
|
+
SeedcordErrorCode[SeedcordErrorCode["PortInUse"] = 1011] = "PortInUse";
|
|
28
|
+
/** A startup task was added or removed while startup ran, or added after it finished. */
|
|
29
|
+
SeedcordErrorCode[SeedcordErrorCode["LifecycleTaskChangeRejected"] = 1101] = "LifecycleTaskChangeRejected";
|
|
30
|
+
/** A lifecycle call got a phase that is not a member of `StartupPhase` or `ShutdownPhase`. */
|
|
31
|
+
SeedcordErrorCode[SeedcordErrorCode["LifecycleUnknownPhase"] = 1102] = "LifecycleUnknownPhase";
|
|
32
|
+
/** One or more tasks failed during a startup phase. */
|
|
33
|
+
SeedcordErrorCode[SeedcordErrorCode["LifecyclePhaseFailures"] = 1103] = "LifecyclePhaseFailures";
|
|
34
|
+
/** A lifecycle task ran past its timeout. */
|
|
35
|
+
SeedcordErrorCode[SeedcordErrorCode["LifecycleTaskTimeout"] = 1104] = "LifecycleTaskTimeout";
|
|
36
|
+
/** A host whose startup failed was started again. */
|
|
37
|
+
SeedcordErrorCode[SeedcordErrorCode["LifecycleRestartAfterFailure"] = 1105] = "LifecycleRestartAfterFailure";
|
|
38
|
+
/** A shutdown deadline or a plugin's lifecycle timeout is zero, negative, or not finite. */
|
|
39
|
+
SeedcordErrorCode[SeedcordErrorCode["LifecycleInvalidTimeout"] = 1106] = "LifecycleInvalidTimeout";
|
|
40
|
+
/** A second Seedcord instance was constructed while one already exists. */
|
|
41
|
+
SeedcordErrorCode[SeedcordErrorCode["CoreSingletonViolation"] = 1201] = "CoreSingletonViolation";
|
|
42
|
+
/** A plugin was attached after the bot started. */
|
|
43
|
+
SeedcordErrorCode[SeedcordErrorCode["CorePluginAfterInit"] = 1202] = "CorePluginAfterInit";
|
|
44
|
+
/** A plugin was attached under a key another plugin already uses. */
|
|
45
|
+
SeedcordErrorCode[SeedcordErrorCode["CorePluginKeyExists"] = 1203] = "CorePluginKeyExists";
|
|
46
|
+
/** The bot's own role is missing from the guild's role cache. */
|
|
47
|
+
SeedcordErrorCode[SeedcordErrorCode["CoreBotRoleMissing"] = 1204] = "CoreBotRoleMissing";
|
|
48
|
+
/** A bot controller was constructed without the folder that holds its handlers. */
|
|
49
|
+
SeedcordErrorCode[SeedcordErrorCode["CoreControllerPathMissing"] = 1205] = "CoreControllerPathMissing";
|
|
50
|
+
/** seedcord could not import a file in the bot or in the CLI. */
|
|
51
|
+
SeedcordErrorCode[SeedcordErrorCode["CoreImportFailed"] = 1206] = "CoreImportFailed";
|
|
52
|
+
/** A file or folder that seedcord reads could not be read. */
|
|
53
|
+
SeedcordErrorCode[SeedcordErrorCode["CorePathUnreadable"] = 1207] = "CorePathUnreadable";
|
|
54
|
+
/** A plugin was attached under a key that the framework logs on. */
|
|
55
|
+
SeedcordErrorCode[SeedcordErrorCode["CorePluginReservedChannel"] = 1208] = "CorePluginReservedChannel";
|
|
56
|
+
/** The application id was read before startup resolved it. */
|
|
57
|
+
SeedcordErrorCode[SeedcordErrorCode["CoreApplicationUnavailable"] = 1209] = "CoreApplicationUnavailable";
|
|
58
|
+
/** A generated accessor like `Emojis` or `Commands` was read for a key that has no value yet. */
|
|
59
|
+
SeedcordErrorCode[SeedcordErrorCode["CoreAccessorUnresolved"] = 1210] = "CoreAccessorUnresolved";
|
|
60
|
+
/** A shutdown task was added on an edge bot. Cloudflare stops an isolate without a shutdown hook. */
|
|
61
|
+
SeedcordErrorCode[SeedcordErrorCode["CoreLifecycleUnavailable"] = 1211] = "CoreLifecycleUnavailable";
|
|
62
|
+
/** `emit` was called on the bus. It calls the listeners and skips every subscriber. */
|
|
63
|
+
SeedcordErrorCode[SeedcordErrorCode["CoreBusEmitUnavailable"] = 1212] = "CoreBusEmitUnavailable";
|
|
64
|
+
/** A command registers to the `'config'` guilds while `commands.guilds` is empty. */
|
|
65
|
+
SeedcordErrorCode[SeedcordErrorCode["CoreCommandGuildsEmpty"] = 1213] = "CoreCommandGuildsEmpty";
|
|
66
|
+
/** Discord refused the command deploy for one guild. */
|
|
67
|
+
SeedcordErrorCode[SeedcordErrorCode["CoreCommandGuildDeployFailed"] = 1214] = "CoreCommandGuildDeployFailed";
|
|
68
|
+
/** A plugin was attached under a group name the bot already uses. */
|
|
69
|
+
SeedcordErrorCode[SeedcordErrorCode["CorePluginGroupTaken"] = 1215] = "CorePluginGroupTaken";
|
|
70
|
+
/** A plugin was attached at a name that holds a group of plugins. */
|
|
71
|
+
SeedcordErrorCode[SeedcordErrorCode["CorePluginKeyHoldsGroup"] = 1216] = "CorePluginKeyHoldsGroup";
|
|
72
|
+
/** A plugin key is empty, has an empty part, or has more than one dot. */
|
|
73
|
+
SeedcordErrorCode[SeedcordErrorCode["CorePluginKeyMalformed"] = 1217] = "CorePluginKeyMalformed";
|
|
74
|
+
/** An attached plugin extends the `Plugin` class of a different copy of `@seedcord/core`. */
|
|
75
|
+
SeedcordErrorCode[SeedcordErrorCode["CorePluginFromOtherCore"] = 1218] = "CorePluginFromOtherCore";
|
|
76
|
+
/** A folder or the `build.start` file is outside `root`. */
|
|
77
|
+
SeedcordErrorCode[SeedcordErrorCode["CorePathOutsideRoot"] = 1219] = "CorePathOutsideRoot";
|
|
78
|
+
/** A plugin declares a transport or runtime the bot doesn't use. */
|
|
79
|
+
SeedcordErrorCode[SeedcordErrorCode["CorePluginScopeMismatch"] = 1220] = "CorePluginScopeMismatch";
|
|
80
|
+
/** A node http bot got a request through `fetch` before `start()` was called. */
|
|
81
|
+
SeedcordErrorCode[SeedcordErrorCode["CoreFetchBeforeStart"] = 1221] = "CoreFetchBeforeStart";
|
|
82
|
+
/** An edge worker got a POST without the ids that `seedcord build` writes into it. */
|
|
83
|
+
SeedcordErrorCode[SeedcordErrorCode["CoreEdgeUnbuilt"] = 1222] = "CoreEdgeUnbuilt";
|
|
84
|
+
/** A relative folder was read in a process that never got the bot's `root`. */
|
|
85
|
+
SeedcordErrorCode[SeedcordErrorCode["CoreDirectoryRootUnknown"] = 1223] = "CoreDirectoryRootUnknown";
|
|
86
|
+
/** Discord refused the global command deploy. */
|
|
87
|
+
SeedcordErrorCode[SeedcordErrorCode["CoreCommandGlobalDeployFailed"] = 1224] = "CoreCommandGlobalDeployFailed";
|
|
88
|
+
/** A built bot read a folder that did not exist under `root` when `seedcord build` ran. */
|
|
89
|
+
SeedcordErrorCode[SeedcordErrorCode["CoreDirectoryNotBuilt"] = 1225] = "CoreDirectoryNotBuilt";
|
|
90
|
+
/** A webhook sender was constructed with a URL that is not a Discord webhook URL. */
|
|
91
|
+
SeedcordErrorCode[SeedcordErrorCode["CoreWebhookUrlInvalid"] = 1226] = "CoreWebhookUrlInvalid";
|
|
92
|
+
/** Reading from Discord with `DISCORD_BOT_TOKEN` failed, like the application, its public key, or its commands. */
|
|
93
|
+
SeedcordErrorCode[SeedcordErrorCode["CoreDiscordReadFailed"] = 1227] = "CoreDiscordReadFailed";
|
|
94
|
+
/** Two routes, commands, migrations, or customId fields have the same name, or two code files build to the same file. */
|
|
95
|
+
SeedcordErrorCode[SeedcordErrorCode["CoreDuplicateName"] = 1228] = "CoreDuplicateName";
|
|
96
|
+
/** A Vite plugin from `vitePlugins` threw while Vite started or loaded a file, or failed when seedcord called `vitePlugins`. */
|
|
97
|
+
SeedcordErrorCode[SeedcordErrorCode["CoreVitePluginThrew"] = 1229] = "CoreVitePluginThrew";
|
|
98
|
+
/** `readFiles` read a folder that `files` in `seedcord.config.ts` leaves out. */
|
|
99
|
+
SeedcordErrorCode[SeedcordErrorCode["CoreDirectoryNotListed"] = 1230] = "CoreDirectoryNotListed";
|
|
100
|
+
/** A folder is inside one that `seedcord build` skips, like a dot-folder, `node_modules`, `outDir` or the logs folder. */
|
|
101
|
+
SeedcordErrorCode[SeedcordErrorCode["CoreDirectorySkipped"] = 1231] = "CoreDirectorySkipped";
|
|
102
|
+
/** `collection.entries()` ran on a Keyv store in `config.kv` that can't list its keys. */
|
|
103
|
+
SeedcordErrorCode[SeedcordErrorCode["CoreKvKeysUnsupported"] = 1232] = "CoreKvKeysUnsupported";
|
|
104
|
+
/** A plugin built with `new` outside `attach()` read `this.kv`. */
|
|
105
|
+
SeedcordErrorCode[SeedcordErrorCode["CorePluginKvOutsideAttach"] = 1233] = "CorePluginKvOutsideAttach";
|
|
106
|
+
/** The driver in `config.kv` threw, or reported a write as failed. */
|
|
107
|
+
SeedcordErrorCode[SeedcordErrorCode["CoreKvDriverFailed"] = 1234] = "CoreKvDriverFailed";
|
|
108
|
+
/** The bot's own member is missing from the guild's member cache. */
|
|
109
|
+
SeedcordErrorCode[SeedcordErrorCode["CoreBotMemberMissing"] = 1235] = "CoreBotMemberMissing";
|
|
110
|
+
/** A module from a build read its path, but the build's `index.mjs` didn't run first. */
|
|
111
|
+
SeedcordErrorCode[SeedcordErrorCode["CoreBuiltModuleRanDirectly"] = 1236] = "CoreBuiltModuleRanDirectly";
|
|
112
|
+
/** A command class carries `@RegisterCommand` twice. */
|
|
113
|
+
SeedcordErrorCode[SeedcordErrorCode["DecoratorCommandAlreadyRegistered"] = 1301] = "DecoratorCommandAlreadyRegistered";
|
|
114
|
+
/** `@RegisterCommand('global')` was given guild ids. */
|
|
115
|
+
SeedcordErrorCode[SeedcordErrorCode["DecoratorCommandGlobalWithGuilds"] = 1302] = "DecoratorCommandGlobalWithGuilds";
|
|
116
|
+
/** `@RegisterCommand('guild')` was given no guild ids. */
|
|
117
|
+
SeedcordErrorCode[SeedcordErrorCode["DecoratorCommandGuildWithoutGuilds"] = 1303] = "DecoratorCommandGuildWithoutGuilds";
|
|
118
|
+
/** A middleware decorator sets a priority that is not a finite number. */
|
|
119
|
+
SeedcordErrorCode[SeedcordErrorCode["DecoratorInvalidMiddlewarePriority"] = 1304] = "DecoratorInvalidMiddlewarePriority";
|
|
120
|
+
/** A `WebhookLog` subclass is missing its `@WebhookUrl` decorator. */
|
|
121
|
+
SeedcordErrorCode[SeedcordErrorCode["DecoratorWebhookUrlMissing"] = 1305] = "DecoratorWebhookUrlMissing";
|
|
122
|
+
/** A middleware decorator got an empty filter array. */
|
|
123
|
+
SeedcordErrorCode[SeedcordErrorCode["DecoratorEmptyMiddlewareFilter"] = 1306] = "DecoratorEmptyMiddlewareFilter";
|
|
124
|
+
/** `@Subscribe`, `@RegisterEvent`, or a component route decorator lists the same key or customId prefix twice. */
|
|
125
|
+
SeedcordErrorCode[SeedcordErrorCode["DecoratorDuplicateKey"] = 1307] = "DecoratorDuplicateKey";
|
|
126
|
+
/** A reply method was called in an ack state where Discord rejects it. */
|
|
127
|
+
SeedcordErrorCode[SeedcordErrorCode["ReplyIllegalAckState"] = 1501] = "ReplyIllegalAckState";
|
|
128
|
+
/** A reply component threw while seedcord serialized it. */
|
|
129
|
+
SeedcordErrorCode[SeedcordErrorCode["ReplyComponentSerialization"] = 1502] = "ReplyComponentSerialization";
|
|
130
|
+
/** `edit()` got a message that the interaction did not send. */
|
|
131
|
+
SeedcordErrorCode[SeedcordErrorCode["ReplyForeignEditTarget"] = 1503] = "ReplyForeignEditTarget";
|
|
132
|
+
/** `update()` or `deferUpdate()` was called on a modal that has no source message. */
|
|
133
|
+
SeedcordErrorCode[SeedcordErrorCode["ReplyUpdateWithoutSource"] = 1504] = "ReplyUpdateWithoutSource";
|
|
134
|
+
/** Discord's response to a `withResponse` callback has no message in it. */
|
|
135
|
+
SeedcordErrorCode[SeedcordErrorCode["ReplyCallbackMissingMessage"] = 1505] = "ReplyCallbackMissingMessage";
|
|
136
|
+
/** A customId prefix is empty, or holds a colon or a control character. */
|
|
137
|
+
SeedcordErrorCode[SeedcordErrorCode["CustomIdInvalidPrefix"] = 1601] = "CustomIdInvalidPrefix";
|
|
138
|
+
/** A customId field name looks like an integer. JS reorders integer keys. */
|
|
139
|
+
SeedcordErrorCode[SeedcordErrorCode["CustomIdReservedFieldName"] = 1602] = "CustomIdReservedFieldName";
|
|
140
|
+
/** A `oneOf()` or `someOf()` field was declared with no choices. */
|
|
141
|
+
SeedcordErrorCode[SeedcordErrorCode["CustomIdEmptyChoices"] = 1603] = "CustomIdEmptyChoices";
|
|
142
|
+
/** An `int()` field was declared with a min greater than its max. */
|
|
143
|
+
SeedcordErrorCode[SeedcordErrorCode["CustomIdInvalidBounds"] = 1604] = "CustomIdInvalidBounds";
|
|
144
|
+
/** `encode()` got a value that doesn't fit its field. */
|
|
145
|
+
SeedcordErrorCode[SeedcordErrorCode["CustomIdValueRejected"] = 1605] = "CustomIdValueRejected";
|
|
146
|
+
/** An encoded customId is longer than the 100 characters Discord allows. */
|
|
147
|
+
SeedcordErrorCode[SeedcordErrorCode["CustomIdWireTooLong"] = 1606] = "CustomIdWireTooLong";
|
|
148
|
+
/** A component handler is missing the route decorator that matches its base. */
|
|
149
|
+
SeedcordErrorCode[SeedcordErrorCode["CustomIdHandlerRouteMissing"] = 1607] = "CustomIdHandlerRouteMissing";
|
|
150
|
+
/** A handler's `match()` doesn't have a case for the current route, field, event, or command. */
|
|
151
|
+
SeedcordErrorCode[SeedcordErrorCode["MatchCaseMissing"] = 1608] = "MatchCaseMissing";
|
|
152
|
+
/** Discord sent an autocomplete payload with no focused option. */
|
|
153
|
+
SeedcordErrorCode[SeedcordErrorCode["AutocompleteNoFocusedOption"] = 1610] = "AutocompleteNoFocusedOption";
|
|
154
|
+
/** The submitted modal has no field with the requested custom id. */
|
|
155
|
+
SeedcordErrorCode[SeedcordErrorCode["ModalFieldNotFound"] = 1611] = "ModalFieldNotFound";
|
|
156
|
+
/** A modal field getter was called on a field of another kind. */
|
|
157
|
+
SeedcordErrorCode[SeedcordErrorCode["ModalFieldWrongKind"] = 1612] = "ModalFieldWrongKind";
|
|
158
|
+
/** A modal field read as required has nothing picked. */
|
|
159
|
+
SeedcordErrorCode[SeedcordErrorCode["ModalFieldEmpty"] = 1613] = "ModalFieldEmpty";
|
|
160
|
+
/** A channel select returned a channel whose type the `getSelectedChannels()` call excludes. */
|
|
161
|
+
SeedcordErrorCode[SeedcordErrorCode["ModalFieldChannelType"] = 1614] = "ModalFieldChannelType";
|
|
162
|
+
/** A customId was encoded under an older shape of the same definition. */
|
|
163
|
+
SeedcordErrorCode[SeedcordErrorCode["CustomIdWireStale"] = 1615] = "CustomIdWireStale";
|
|
164
|
+
/** A customId is corrupt, truncated, or was encoded by a different definition. */
|
|
165
|
+
SeedcordErrorCode[SeedcordErrorCode["CustomIdWireInvalid"] = 1616] = "CustomIdWireInvalid";
|
|
166
|
+
/** `dispatch.require()` was called for a key that nothing set on this dispatch. */
|
|
167
|
+
SeedcordErrorCode[SeedcordErrorCode["DispatchStateMissing"] = 1617] = "DispatchStateMissing";
|
|
168
|
+
/** A `Cooldown` gate got a duration that doesn't parse, or one of zero or less. */
|
|
169
|
+
SeedcordErrorCode[SeedcordErrorCode["GateInvalidCooldownDuration"] = 1701] = "GateInvalidCooldownDuration";
|
|
170
|
+
/** A paginator got a `perPage` that is not a positive integer. */
|
|
171
|
+
SeedcordErrorCode[SeedcordErrorCode["PaginationInvalidPerPage"] = 1801] = "PaginationInvalidPerPage";
|
|
172
|
+
/** A control row has no controls, or more than the five buttons Discord allows. */
|
|
173
|
+
SeedcordErrorCode[SeedcordErrorCode["PaginationControlCount"] = 1802] = "PaginationControlCount";
|
|
174
|
+
/** A control row lists the same control twice. Its two buttons would share a custom_id. */
|
|
175
|
+
SeedcordErrorCode[SeedcordErrorCode["PaginationDuplicateControls"] = 1803] = "PaginationDuplicateControls";
|
|
176
|
+
/** A color value doesn't resolve to a Discord color integer. */
|
|
177
|
+
SeedcordErrorCode[SeedcordErrorCode["ColorUnresolvable"] = 1901] = "ColorUnresolvable";
|
|
178
|
+
/** A resolved color is outside Discord's range of 0x000000 to 0xffffff. */
|
|
179
|
+
SeedcordErrorCode[SeedcordErrorCode["ColorOutOfRange"] = 1902] = "ColorOutOfRange";
|
|
180
|
+
/** `renderTable` got a `maxWidth` or `padding` outside the values it accepts. */
|
|
181
|
+
SeedcordErrorCode[SeedcordErrorCode["UtilTableOptionInvalid"] = 1951] = "UtilTableOptionInvalid";
|
|
182
|
+
/** `assertNever` ran with a value that its types ruled out. */
|
|
183
|
+
SeedcordErrorCode[SeedcordErrorCode["UtilUnhandledUnionMember"] = 1952] = "UtilUnhandledUnionMember";
|
|
184
|
+
/** `WinstonFileSink` got a `filename` with a folder in it. File logs always go in the logs folder. */
|
|
185
|
+
SeedcordErrorCode[SeedcordErrorCode["LoggerFileNameHasFolder"] = 1971] = "LoggerFileNameHasFolder";
|
|
186
|
+
/** A plugin's constructor called `rejectOptions` on the options it got. */
|
|
187
|
+
SeedcordErrorCode[SeedcordErrorCode["PluginOptionsRejected"] = 2001] = "PluginOptionsRejected";
|
|
188
|
+
/** Two or more plugins threw while disposing. */
|
|
189
|
+
SeedcordErrorCode[SeedcordErrorCode["PluginDisposeFailures"] = 2002] = "PluginDisposeFailures";
|
|
190
|
+
/** A plugin service class is missing the decorator that registers it. */
|
|
191
|
+
SeedcordErrorCode[SeedcordErrorCode["PluginServiceDecoratorMissing"] = 2003] = "PluginServiceDecoratorMissing";
|
|
192
|
+
/** A plugin's `services` was read before the plugin finished `init()`. */
|
|
193
|
+
SeedcordErrorCode[SeedcordErrorCode["PluginServicesNotReady"] = 2004] = "PluginServicesNotReady";
|
|
194
|
+
/** A plugin could not connect to the service it wraps. */
|
|
195
|
+
SeedcordErrorCode[SeedcordErrorCode["PluginConnectionFailed"] = 2005] = "PluginConnectionFailed";
|
|
196
|
+
/** A plugin could not close its connection cleanly during shutdown. */
|
|
197
|
+
SeedcordErrorCode[SeedcordErrorCode["PluginDisconnectFailed"] = 2006] = "PluginDisconnectFailed";
|
|
198
|
+
/** Mongoose threw while building a model, usually for a duplicate model name or a missing schema. */
|
|
199
|
+
SeedcordErrorCode[SeedcordErrorCode["PluginMongooseModelCreationFailed"] = 2101] = "PluginMongooseModelCreationFailed";
|
|
200
|
+
/** A mongoose service was registered with an empty model name. */
|
|
201
|
+
SeedcordErrorCode[SeedcordErrorCode["PluginMongooseModelNameMissing"] = 2102] = "PluginMongooseModelNameMissing";
|
|
202
|
+
/** A kysely service class has no table. */
|
|
203
|
+
SeedcordErrorCode[SeedcordErrorCode["PluginKyselyServiceTableMissing"] = 2201] = "PluginKyselyServiceTableMissing";
|
|
204
|
+
/** A migration run got a step count that is not a non-negative integer. */
|
|
205
|
+
SeedcordErrorCode[SeedcordErrorCode["PluginKyselyInvalidStepCount"] = 2202] = "PluginKyselyInvalidStepCount";
|
|
206
|
+
/** A migration run got a direction other than `up` or `down`. */
|
|
207
|
+
SeedcordErrorCode[SeedcordErrorCode["PluginKyselyUnknownDirection"] = 2203] = "PluginKyselyUnknownDirection";
|
|
208
|
+
/** A file in the migrations folder has no `up` function. */
|
|
209
|
+
SeedcordErrorCode[SeedcordErrorCode["PluginKyselyInvalidMigrationModule"] = 2204] = "PluginKyselyInvalidMigrationModule";
|
|
210
|
+
/** A migration failed with a thrown value that is not an `Error`. */
|
|
211
|
+
SeedcordErrorCode[SeedcordErrorCode["PluginKyselyNonErrorFailure"] = 2205] = "PluginKyselyNonErrorFailure";
|
|
212
|
+
/** Creating the target Postgres database failed. */
|
|
213
|
+
SeedcordErrorCode[SeedcordErrorCode["PluginKyselyBootstrapFailed"] = 2206] = "PluginKyselyBootstrapFailed";
|
|
214
|
+
/** Someone pressed Ctrl-C at a prompt in `seedcord` or `create-seedcord`. */
|
|
215
|
+
SeedcordErrorCode[SeedcordErrorCode["CliCancelled"] = 3001] = "CliCancelled";
|
|
216
|
+
/** The seedcord config file's default export is not an object. */
|
|
217
|
+
SeedcordErrorCode[SeedcordErrorCode["CliConfigInvalidExport"] = 3101] = "CliConfigInvalidExport";
|
|
218
|
+
/** No seedcord config file exists in the folder the CLI searched. */
|
|
219
|
+
SeedcordErrorCode[SeedcordErrorCode["CliConfigNotFound"] = 3102] = "CliConfigNotFound";
|
|
220
|
+
/** The file that `instance` or `build.start` in the seedcord config points at does not exist. */
|
|
221
|
+
SeedcordErrorCode[SeedcordErrorCode["CliFileNotFound"] = 3103] = "CliFileNotFound";
|
|
222
|
+
/** The instance file's default export is not a constructed `Seedcord`. */
|
|
223
|
+
SeedcordErrorCode[SeedcordErrorCode["CliInstanceInvalid"] = 3104] = "CliInstanceInvalid";
|
|
224
|
+
/** The bot threw during startup. */
|
|
225
|
+
SeedcordErrorCode[SeedcordErrorCode["CliStartFailed"] = 3105] = "CliStartFailed";
|
|
226
|
+
/** `build.tsconfig` points at a missing file, or it is unset and the config's folder has no `tsconfig.json`. */
|
|
227
|
+
SeedcordErrorCode[SeedcordErrorCode["CliTsconfigNotFound"] = 3106] = "CliTsconfigNotFound";
|
|
228
|
+
/** `seedcord build` found type errors. */
|
|
229
|
+
SeedcordErrorCode[SeedcordErrorCode["CliBuildFailed"] = 3107] = "CliBuildFailed";
|
|
230
|
+
/** `commands clean` or `commands purge` ran without a flag that picks where it deletes. */
|
|
231
|
+
SeedcordErrorCode[SeedcordErrorCode["CliNoScopeGiven"] = 3108] = "CliNoScopeGiven";
|
|
232
|
+
/** cloudflared never reported a quick tunnel hostname. */
|
|
233
|
+
SeedcordErrorCode[SeedcordErrorCode["CliTunnelUrlUnavailable"] = 3109] = "CliTunnelUrlUnavailable";
|
|
234
|
+
/** Discord rejected the tunnel URL as an interactions endpoint. */
|
|
235
|
+
SeedcordErrorCode[SeedcordErrorCode["CliTunnelNotVerified"] = 3110] = "CliTunnelNotVerified";
|
|
236
|
+
/** The tunnel URL never answered its health probe. */
|
|
237
|
+
SeedcordErrorCode[SeedcordErrorCode["CliTunnelUnreachable"] = 3111] = "CliTunnelUnreachable";
|
|
238
|
+
/** A field in the seedcord config is missing or has the wrong shape. */
|
|
239
|
+
SeedcordErrorCode[SeedcordErrorCode["CliConfigInvalidField"] = 3112] = "CliConfigInvalidField";
|
|
240
|
+
/** A class carrying `@RegisterCommand` threw while seedcord constructed it. */
|
|
241
|
+
SeedcordErrorCode[SeedcordErrorCode["CliCommandConstructorThrew"] = 3113] = "CliCommandConstructorThrew";
|
|
242
|
+
/** Vite threw while bundling the bot. */
|
|
243
|
+
SeedcordErrorCode[SeedcordErrorCode["CliBundleFailed"] = 3114] = "CliBundleFailed";
|
|
244
|
+
/** `build.outDir` is `root` or a folder that contains it. */
|
|
245
|
+
SeedcordErrorCode[SeedcordErrorCode["CliConfigOutDirDeletesRoot"] = 3115] = "CliConfigOutDirDeletesRoot";
|
|
246
|
+
/** The project is missing a dev dependency the CLI runs, like `typescript` or `@cloudflare/vite-plugin`. */
|
|
247
|
+
SeedcordErrorCode[SeedcordErrorCode["CliDependencyMissing"] = 3116] = "CliDependencyMissing";
|
|
248
|
+
/** `build.outDir` already has other files in it. */
|
|
249
|
+
SeedcordErrorCode[SeedcordErrorCode["CliBuildOutDirNotEmpty"] = 3117] = "CliBuildOutDirNotEmpty";
|
|
250
|
+
/** One CLI step found two or more problems. Each one is in the error's `errors`. */
|
|
251
|
+
SeedcordErrorCode[SeedcordErrorCode["CliProblems"] = 3118] = "CliProblems";
|
|
252
|
+
/** `seedcord codegen --check` found the committed augmentations out of date. */
|
|
253
|
+
SeedcordErrorCode[SeedcordErrorCode["CliCodegenOutOfDate"] = 3119] = "CliCodegenOutOfDate";
|
|
254
|
+
/** A file or folder in the project has a `#` in its path. */
|
|
255
|
+
SeedcordErrorCode[SeedcordErrorCode["CliPathHasHash"] = 3120] = "CliPathHasHash";
|
|
256
|
+
/** An edge bot's tsconfig is missing the `workerd` condition. */
|
|
257
|
+
SeedcordErrorCode[SeedcordErrorCode["CliEdgeWithoutWorkerdCondition"] = 3121] = "CliEdgeWithoutWorkerdCondition";
|
|
258
|
+
/** A bot with no `cloudflare.config.ts` sets the `workerd` condition in its tsconfig. */
|
|
259
|
+
SeedcordErrorCode[SeedcordErrorCode["CliWorkerdConditionWithoutCloudflareConfig"] = 3122] = "CliWorkerdConditionWithoutCloudflareConfig";
|
|
260
|
+
/** TypeScript could not read the project's tsconfig, or Cloudflare's config loader could not read `cloudflare.config.ts`. */
|
|
261
|
+
SeedcordErrorCode[SeedcordErrorCode["CliConfigFileUnreadable"] = 3123] = "CliConfigFileUnreadable";
|
|
262
|
+
/** The CLI could not start the TypeScript compiler. */
|
|
263
|
+
SeedcordErrorCode[SeedcordErrorCode["CliTypescriptNotStarted"] = 3124] = "CliTypescriptNotStarted";
|
|
264
|
+
/** A config file sets a field this bot can't set, like `entrypoint` in an edge bot's `cloudflare.config.ts`. */
|
|
265
|
+
SeedcordErrorCode[SeedcordErrorCode["CliConfigFieldUnused"] = 3125] = "CliConfigFieldUnused";
|
|
266
|
+
/** An edge bot's `compatibilityDate` is older than Cloudflare's Node compat default, and no flag turns it on. */
|
|
267
|
+
SeedcordErrorCode[SeedcordErrorCode["CliEdgeCompatDateTooOld"] = 3126] = "CliEdgeCompatDateTooOld";
|
|
268
|
+
/** An edge bot sets `no_nodejs_compat`. */
|
|
269
|
+
SeedcordErrorCode[SeedcordErrorCode["CliEdgeNodeCompatOff"] = 3127] = "CliEdgeNodeCompatOff";
|
|
270
|
+
/** The build could not start the edge worker in workerd. */
|
|
271
|
+
SeedcordErrorCode[SeedcordErrorCode["CliEdgeBootFailed"] = 3128] = "CliEdgeBootFailed";
|
|
272
|
+
/** An edge bot's `root` holds its seedcord config. */
|
|
273
|
+
SeedcordErrorCode[SeedcordErrorCode["CliEdgeRootHoldsConfig"] = 3129] = "CliEdgeRootHoldsConfig";
|
|
274
|
+
/** An edge build found commands in code that have no deployed id on Discord. */
|
|
275
|
+
SeedcordErrorCode[SeedcordErrorCode["CliEdgeCommandsNotDeployed"] = 3130] = "CliEdgeCommandsNotDeployed";
|
|
276
|
+
/** Something called the dev runtime before `start()` finished or after `stop()`. This is a bug in seedcord. */
|
|
277
|
+
SeedcordErrorCode[SeedcordErrorCode["CliDevRuntimeNotRunning"] = 3131] = "CliDevRuntimeNotRunning";
|
|
278
|
+
/** `seedcord commands deploy` ran on a bot whose `commands.path` is `null`. */
|
|
279
|
+
SeedcordErrorCode[SeedcordErrorCode["CliDeployNoCommandsFolder"] = 3132] = "CliDeployNoCommandsFolder";
|
|
280
|
+
/** `seedcord commands deploy` ran without `--yes` where it cannot ask first. */
|
|
281
|
+
SeedcordErrorCode[SeedcordErrorCode["CliDeployNeedsYes"] = 3133] = "CliDeployNeedsYes";
|
|
282
|
+
/** A class carrying `@RegisterCommand` builds a component that is not a command or a context menu. */
|
|
283
|
+
SeedcordErrorCode[SeedcordErrorCode["CliCommandNotACommand"] = 3134] = "CliCommandNotACommand";
|
|
284
|
+
/** `seedcord commands clean` or `purge` could not delete some of the commands it picked. */
|
|
285
|
+
SeedcordErrorCode[SeedcordErrorCode["CliCommandsNotDeleted"] = 3135] = "CliCommandsNotDeleted";
|
|
286
|
+
/** The CLI ran on Bun for an edge bot. */
|
|
287
|
+
SeedcordErrorCode[SeedcordErrorCode["CliEdgeOnBun"] = 3136] = "CliEdgeOnBun";
|
|
288
|
+
/** An edge bot's `cloudflare.config.ts` sets no `worker`. */
|
|
289
|
+
SeedcordErrorCode[SeedcordErrorCode["CliEdgeNoWorker"] = 3137] = "CliEdgeNoWorker";
|
|
290
|
+
/** The running `seedcord` is a different install from the project's own. */
|
|
291
|
+
SeedcordErrorCode[SeedcordErrorCode["CliNotProjectInstall"] = 3138] = "CliNotProjectInstall";
|
|
292
|
+
/** Vite's environments leave out the one seedcord runs the bot in. */
|
|
293
|
+
SeedcordErrorCode[SeedcordErrorCode["CliViteEnvironmentMissing"] = 3139] = "CliViteEnvironmentMissing";
|
|
294
|
+
/** A folder that `files` in `seedcord.config.ts` lists is missing or is a file. */
|
|
295
|
+
SeedcordErrorCode[SeedcordErrorCode["CliListedFolderUnusable"] = 3140] = "CliListedFolderUnusable";
|
|
296
|
+
/** Another `seedcord dev` already runs a bot on the same Discord application. */
|
|
297
|
+
SeedcordErrorCode[SeedcordErrorCode["CliDevAlreadyRunning"] = 3141] = "CliDevAlreadyRunning";
|
|
298
|
+
/** The folder that holds the dev session locks belongs to another user. */
|
|
299
|
+
SeedcordErrorCode[SeedcordErrorCode["CliDevLockFolderNotOwned"] = 3142] = "CliDevLockFolderNotOwned";
|
|
300
|
+
/** A plugin's `codegen()` threw. */
|
|
301
|
+
SeedcordErrorCode[SeedcordErrorCode["CliPluginCodegenThrew"] = 3143] = "CliPluginCodegenThrew";
|
|
302
|
+
/** A plugin class with a `codegen()` is missing its `static readonly id`. */
|
|
303
|
+
SeedcordErrorCode[SeedcordErrorCode["CliPluginCodegenNoId"] = 3144] = "CliPluginCodegenNoId";
|
|
304
|
+
/** A plugin's `codegen()` returned a value that codegen can't write as a type. */
|
|
305
|
+
SeedcordErrorCode[SeedcordErrorCode["CliPluginCodegenValue"] = 3145] = "CliPluginCodegenValue";
|
|
306
|
+
/** Two attachments of one plugin class returned different values at one key from `codegen()`. */
|
|
307
|
+
SeedcordErrorCode[SeedcordErrorCode["CliPluginCodegenConflict"] = 3146] = "CliPluginCodegenConflict";
|
|
308
|
+
/** The text passed to `seedcord ask` isn't a question the guide search accepts. */
|
|
309
|
+
SeedcordErrorCode[SeedcordErrorCode["CliAskBadQuestion"] = 3147] = "CliAskBadQuestion";
|
|
310
|
+
/** The guide search refused `seedcord ask` until a search limit resets. */
|
|
311
|
+
SeedcordErrorCode[SeedcordErrorCode["CliAskHasToWait"] = 3148] = "CliAskHasToWait";
|
|
312
|
+
/** The guide search failed for a reason other than a search limit. */
|
|
313
|
+
SeedcordErrorCode[SeedcordErrorCode["CliAskFailed"] = 3149] = "CliAskFailed";
|
|
314
|
+
/** A flag answers a question that the earlier answers skip. */
|
|
315
|
+
SeedcordErrorCode[SeedcordErrorCode["CreateFlagNotApplicable"] = 3201] = "CreateFlagNotApplicable";
|
|
316
|
+
/** A flag has a value its question rejects. */
|
|
317
|
+
SeedcordErrorCode[SeedcordErrorCode["CreateInvalidAnswer"] = 3202] = "CreateInvalidAnswer";
|
|
318
|
+
/** The command line did not parse. */
|
|
319
|
+
SeedcordErrorCode[SeedcordErrorCode["CreateBadUsage"] = 3203] = "CreateBadUsage";
|
|
320
|
+
/** The target path already has files in it. */
|
|
321
|
+
SeedcordErrorCode[SeedcordErrorCode["CreateTargetNotEmpty"] = 3204] = "CreateTargetNotEmpty";
|
|
322
|
+
/** A command that create-seedcord ran exited non-zero. */
|
|
323
|
+
SeedcordErrorCode[SeedcordErrorCode["CreateStepFailed"] = 3205] = "CreateStepFailed";
|
|
324
|
+
/** The name given to `seedcord make` can't become a file name. */
|
|
325
|
+
SeedcordErrorCode[SeedcordErrorCode["MakeInvalidName"] = 3301] = "MakeInvalidName";
|
|
326
|
+
/** A template calls `importOf` on a folder that doesn't hold exactly one template file. */
|
|
327
|
+
SeedcordErrorCode[SeedcordErrorCode["MakeImportOfUnmatched"] = 3302] = "MakeImportOfUnmatched";
|
|
328
|
+
/** A template uses one value as two of text, a list, and an entry with fields. */
|
|
329
|
+
SeedcordErrorCode[SeedcordErrorCode["MakeValueUsedTwoWays"] = 3303] = "MakeValueUsedTwoWays";
|
|
330
|
+
/** Handlebars could not parse or render a template file. */
|
|
331
|
+
SeedcordErrorCode[SeedcordErrorCode["MakeTemplateFailed"] = 3304] = "MakeTemplateFailed";
|
|
332
|
+
/** A template calls `lookup` with a key that isn't quoted text. */
|
|
333
|
+
SeedcordErrorCode[SeedcordErrorCode["MakeLookupDynamicKey"] = 3305] = "MakeLookupDynamicKey";
|
|
334
|
+
/** `seedcord make` ran without a terminal to ask its questions in. */
|
|
335
|
+
SeedcordErrorCode[SeedcordErrorCode["MakeNeedsTerminal"] = 3306] = "MakeNeedsTerminal";
|
|
336
|
+
/** `seedcord make` found no templates in the bot or its plugins. */
|
|
337
|
+
SeedcordErrorCode[SeedcordErrorCode["MakeNoTemplates"] = 3307] = "MakeNoTemplates";
|
|
338
|
+
/** A path `seedcord make` would write to is taken, by a file on disk or by another file of the same template. */
|
|
339
|
+
SeedcordErrorCode[SeedcordErrorCode["MakePathTaken"] = 3308] = "MakePathTaken";
|
|
340
|
+
/** A template's partial calls itself, so `seedcord make` can't tell how many levels to ask for. */
|
|
341
|
+
SeedcordErrorCode[SeedcordErrorCode["MakePartialCallsItself"] = 3309] = "MakePartialCallsItself";
|
|
342
|
+
return SeedcordErrorCode;
|
|
343
|
+
}({});
|
|
344
|
+
|
|
345
|
+
//#endregion
|
|
346
|
+
export { SeedcordErrorCode };
|
|
347
|
+
//# sourceMappingURL=ErrorCodes.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorCodes.mjs","names":[],"sources":["../src/ErrorCodes.ts"],"sourcesContent":["/* eslint-disable no-magic-numbers */\n\n/**\n * All Seedcord error codes.\n */\nexport enum SeedcordErrorCode {\n /** Two or more configured emojis failed to resolve at startup. */\n ConfigEmojiUnresolved = 1001,\n /** A configured emoji is neither a name nor a `[name, guildId]` pair. */\n ConfigEmojiInvalid = 1002,\n /** The application or guild a configured emoji points at has no emoji with that name. */\n ConfigEmojiNotFound = 1003,\n /** Reading the emojis of the application or guild a configured emoji points at failed. */\n ConfigEmojiSourceUnreadable = 1004,\n /** Discord has no webhook at a configured URL, because it was deleted or the id or token is wrong. */\n ConfigWebhookNotFound = 1005,\n /** A required environment variable is unset. */\n ConfigMissingEnv = 1006,\n /** An environment variable is set to a value seedcord cannot use. */\n ConfigInvalidEnv = 1007,\n /** A command that runs in guilds is registered without the `Guilds` intent, so discord.js caches no guild. */\n MissingGuildsIntent = 1008,\n /** The running Node or Bun is older than the range seedcord declares in `engines`. */\n UnsupportedRuntimeVersion = 1009,\n /** An edge config sets a REST sweeper interval. */\n ConfigEdgeRestSweeper = 1010,\n /** Another process already listens on the port seedcord tries to listen on. */\n PortInUse = 1011,\n\n /** A startup task was added or removed while startup ran, or added after it finished. */\n LifecycleTaskChangeRejected = 1101,\n /** A lifecycle call got a phase that is not a member of `StartupPhase` or `ShutdownPhase`. */\n LifecycleUnknownPhase = 1102,\n /** One or more tasks failed during a startup phase. */\n LifecyclePhaseFailures = 1103,\n /** A lifecycle task ran past its timeout. */\n LifecycleTaskTimeout = 1104,\n /** A host whose startup failed was started again. */\n LifecycleRestartAfterFailure = 1105,\n /** A shutdown deadline or a plugin's lifecycle timeout is zero, negative, or not finite. */\n LifecycleInvalidTimeout = 1106,\n\n /** A second Seedcord instance was constructed while one already exists. */\n CoreSingletonViolation = 1201,\n /** A plugin was attached after the bot started. */\n CorePluginAfterInit = 1202,\n /** A plugin was attached under a key another plugin already uses. */\n CorePluginKeyExists = 1203,\n /** The bot's own role is missing from the guild's role cache. */\n CoreBotRoleMissing = 1204,\n /** A bot controller was constructed without the folder that holds its handlers. */\n CoreControllerPathMissing = 1205,\n /** seedcord could not import a file in the bot or in the CLI. */\n CoreImportFailed = 1206,\n /** A file or folder that seedcord reads could not be read. */\n CorePathUnreadable = 1207,\n /** A plugin was attached under a key that the framework logs on. */\n CorePluginReservedChannel = 1208,\n /** The application id was read before startup resolved it. */\n CoreApplicationUnavailable = 1209,\n /** A generated accessor like `Emojis` or `Commands` was read for a key that has no value yet. */\n CoreAccessorUnresolved = 1210,\n /** A shutdown task was added on an edge bot. Cloudflare stops an isolate without a shutdown hook. */\n CoreLifecycleUnavailable = 1211,\n /** `emit` was called on the bus. It calls the listeners and skips every subscriber. */\n CoreBusEmitUnavailable = 1212,\n /** A command registers to the `'config'` guilds while `commands.guilds` is empty. */\n CoreCommandGuildsEmpty = 1213,\n /** Discord refused the command deploy for one guild. */\n CoreCommandGuildDeployFailed = 1214,\n /** A plugin was attached under a group name the bot already uses. */\n CorePluginGroupTaken = 1215,\n /** A plugin was attached at a name that holds a group of plugins. */\n CorePluginKeyHoldsGroup = 1216,\n /** A plugin key is empty, has an empty part, or has more than one dot. */\n CorePluginKeyMalformed = 1217,\n /** An attached plugin extends the `Plugin` class of a different copy of `@seedcord/core`. */\n CorePluginFromOtherCore = 1218,\n /** A folder or the `build.start` file is outside `root`. */\n CorePathOutsideRoot = 1219,\n /** A plugin declares a transport or runtime the bot doesn't use. */\n CorePluginScopeMismatch = 1220,\n /** A node http bot got a request through `fetch` before `start()` was called. */\n CoreFetchBeforeStart = 1221,\n /** An edge worker got a POST without the ids that `seedcord build` writes into it. */\n CoreEdgeUnbuilt = 1222,\n /** A relative folder was read in a process that never got the bot's `root`. */\n CoreDirectoryRootUnknown = 1223,\n /** Discord refused the global command deploy. */\n CoreCommandGlobalDeployFailed = 1224,\n /** A built bot read a folder that did not exist under `root` when `seedcord build` ran. */\n CoreDirectoryNotBuilt = 1225,\n /** A webhook sender was constructed with a URL that is not a Discord webhook URL. */\n CoreWebhookUrlInvalid = 1226,\n /** Reading from Discord with `DISCORD_BOT_TOKEN` failed, like the application, its public key, or its commands. */\n CoreDiscordReadFailed = 1227,\n /** Two routes, commands, migrations, or customId fields have the same name, or two code files build to the same file. */\n CoreDuplicateName = 1228,\n /** A Vite plugin from `vitePlugins` threw while Vite started or loaded a file, or failed when seedcord called `vitePlugins`. */\n CoreVitePluginThrew = 1229,\n /** `readFiles` read a folder that `files` in `seedcord.config.ts` leaves out. */\n CoreDirectoryNotListed = 1230,\n /** A folder is inside one that `seedcord build` skips, like a dot-folder, `node_modules`, `outDir` or the logs folder. */\n CoreDirectorySkipped = 1231,\n /** `collection.entries()` ran on a Keyv store in `config.kv` that can't list its keys. */\n CoreKvKeysUnsupported = 1232,\n /** A plugin built with `new` outside `attach()` read `this.kv`. */\n CorePluginKvOutsideAttach = 1233,\n /** The driver in `config.kv` threw, or reported a write as failed. */\n CoreKvDriverFailed = 1234,\n /** The bot's own member is missing from the guild's member cache. */\n CoreBotMemberMissing = 1235,\n /** A module from a build read its path, but the build's `index.mjs` didn't run first. */\n CoreBuiltModuleRanDirectly = 1236,\n\n /** A command class carries `@RegisterCommand` twice. */\n DecoratorCommandAlreadyRegistered = 1301,\n /** `@RegisterCommand('global')` was given guild ids. */\n DecoratorCommandGlobalWithGuilds = 1302,\n /** `@RegisterCommand('guild')` was given no guild ids. */\n DecoratorCommandGuildWithoutGuilds = 1303,\n /** A middleware decorator sets a priority that is not a finite number. */\n DecoratorInvalidMiddlewarePriority = 1304,\n /** A `WebhookLog` subclass is missing its `@WebhookUrl` decorator. */\n DecoratorWebhookUrlMissing = 1305,\n /** A middleware decorator got an empty filter array. */\n DecoratorEmptyMiddlewareFilter = 1306,\n /** `@Subscribe`, `@RegisterEvent`, or a component route decorator lists the same key or customId prefix twice. */\n DecoratorDuplicateKey = 1307,\n\n /** A reply method was called in an ack state where Discord rejects it. */\n ReplyIllegalAckState = 1501,\n /** A reply component threw while seedcord serialized it. */\n ReplyComponentSerialization = 1502,\n /** `edit()` got a message that the interaction did not send. */\n ReplyForeignEditTarget = 1503,\n /** `update()` or `deferUpdate()` was called on a modal that has no source message. */\n ReplyUpdateWithoutSource = 1504,\n /** Discord's response to a `withResponse` callback has no message in it. */\n ReplyCallbackMissingMessage = 1505,\n\n /** A customId prefix is empty, or holds a colon or a control character. */\n CustomIdInvalidPrefix = 1601,\n /** A customId field name looks like an integer. JS reorders integer keys. */\n CustomIdReservedFieldName = 1602,\n /** A `oneOf()` or `someOf()` field was declared with no choices. */\n CustomIdEmptyChoices = 1603,\n /** An `int()` field was declared with a min greater than its max. */\n CustomIdInvalidBounds = 1604,\n /** `encode()` got a value that doesn't fit its field. */\n CustomIdValueRejected = 1605,\n /** An encoded customId is longer than the 100 characters Discord allows. */\n CustomIdWireTooLong = 1606,\n /** A component handler is missing the route decorator that matches its base. */\n CustomIdHandlerRouteMissing = 1607,\n /** A handler's `match()` doesn't have a case for the current route, field, event, or command. */\n MatchCaseMissing = 1608,\n /** Discord sent an autocomplete payload with no focused option. */\n AutocompleteNoFocusedOption = 1610,\n /** The submitted modal has no field with the requested custom id. */\n ModalFieldNotFound = 1611,\n /** A modal field getter was called on a field of another kind. */\n ModalFieldWrongKind = 1612,\n /** A modal field read as required has nothing picked. */\n ModalFieldEmpty = 1613,\n /** A channel select returned a channel whose type the `getSelectedChannels()` call excludes. */\n ModalFieldChannelType = 1614,\n /** A customId was encoded under an older shape of the same definition. */\n CustomIdWireStale = 1615,\n /** A customId is corrupt, truncated, or was encoded by a different definition. */\n CustomIdWireInvalid = 1616,\n /** `dispatch.require()` was called for a key that nothing set on this dispatch. */\n DispatchStateMissing = 1617,\n\n /** A `Cooldown` gate got a duration that doesn't parse, or one of zero or less. */\n GateInvalidCooldownDuration = 1701,\n\n /** A paginator got a `perPage` that is not a positive integer. */\n PaginationInvalidPerPage = 1801,\n /** A control row has no controls, or more than the five buttons Discord allows. */\n PaginationControlCount = 1802,\n /** A control row lists the same control twice. Its two buttons would share a custom_id. */\n PaginationDuplicateControls = 1803,\n\n /** A color value doesn't resolve to a Discord color integer. */\n ColorUnresolvable = 1901,\n /** A resolved color is outside Discord's range of 0x000000 to 0xffffff. */\n ColorOutOfRange = 1902,\n\n /** `renderTable` got a `maxWidth` or `padding` outside the values it accepts. */\n UtilTableOptionInvalid = 1951,\n /** `assertNever` ran with a value that its types ruled out. */\n UtilUnhandledUnionMember = 1952,\n\n /** `WinstonFileSink` got a `filename` with a folder in it. File logs always go in the logs folder. */\n LoggerFileNameHasFolder = 1971,\n\n /** A plugin's constructor called `rejectOptions` on the options it got. */\n PluginOptionsRejected = 2001,\n /** Two or more plugins threw while disposing. */\n PluginDisposeFailures = 2002,\n /** A plugin service class is missing the decorator that registers it. */\n PluginServiceDecoratorMissing = 2003,\n /** A plugin's `services` was read before the plugin finished `init()`. */\n PluginServicesNotReady = 2004,\n /** A plugin could not connect to the service it wraps. */\n PluginConnectionFailed = 2005,\n /** A plugin could not close its connection cleanly during shutdown. */\n PluginDisconnectFailed = 2006,\n\n /** Mongoose threw while building a model, usually for a duplicate model name or a missing schema. */\n PluginMongooseModelCreationFailed = 2101,\n /** A mongoose service was registered with an empty model name. */\n PluginMongooseModelNameMissing = 2102,\n\n /** A kysely service class has no table. */\n PluginKyselyServiceTableMissing = 2201,\n /** A migration run got a step count that is not a non-negative integer. */\n PluginKyselyInvalidStepCount = 2202,\n /** A migration run got a direction other than `up` or `down`. */\n PluginKyselyUnknownDirection = 2203,\n /** A file in the migrations folder has no `up` function. */\n PluginKyselyInvalidMigrationModule = 2204,\n /** A migration failed with a thrown value that is not an `Error`. */\n PluginKyselyNonErrorFailure = 2205,\n /** Creating the target Postgres database failed. */\n PluginKyselyBootstrapFailed = 2206,\n\n /** Someone pressed Ctrl-C at a prompt in `seedcord` or `create-seedcord`. */\n CliCancelled = 3001,\n\n /** The seedcord config file's default export is not an object. */\n CliConfigInvalidExport = 3101,\n /** No seedcord config file exists in the folder the CLI searched. */\n CliConfigNotFound = 3102,\n /** The file that `instance` or `build.start` in the seedcord config points at does not exist. */\n CliFileNotFound = 3103,\n /** The instance file's default export is not a constructed `Seedcord`. */\n CliInstanceInvalid = 3104,\n /** The bot threw during startup. */\n CliStartFailed = 3105,\n /** `build.tsconfig` points at a missing file, or it is unset and the config's folder has no `tsconfig.json`. */\n CliTsconfigNotFound = 3106,\n /** `seedcord build` found type errors. */\n CliBuildFailed = 3107,\n /** `commands clean` or `commands purge` ran without a flag that picks where it deletes. */\n CliNoScopeGiven = 3108,\n /** cloudflared never reported a quick tunnel hostname. */\n CliTunnelUrlUnavailable = 3109,\n /** Discord rejected the tunnel URL as an interactions endpoint. */\n CliTunnelNotVerified = 3110,\n /** The tunnel URL never answered its health probe. */\n CliTunnelUnreachable = 3111,\n /** A field in the seedcord config is missing or has the wrong shape. */\n CliConfigInvalidField = 3112,\n /** A class carrying `@RegisterCommand` threw while seedcord constructed it. */\n CliCommandConstructorThrew = 3113,\n /** Vite threw while bundling the bot. */\n CliBundleFailed = 3114,\n /** `build.outDir` is `root` or a folder that contains it. */\n CliConfigOutDirDeletesRoot = 3115,\n /** The project is missing a dev dependency the CLI runs, like `typescript` or `@cloudflare/vite-plugin`. */\n CliDependencyMissing = 3116,\n /** `build.outDir` already has other files in it. */\n CliBuildOutDirNotEmpty = 3117,\n /** One CLI step found two or more problems. Each one is in the error's `errors`. */\n CliProblems = 3118,\n /** `seedcord codegen --check` found the committed augmentations out of date. */\n CliCodegenOutOfDate = 3119,\n /** A file or folder in the project has a `#` in its path. */\n CliPathHasHash = 3120,\n /** An edge bot's tsconfig is missing the `workerd` condition. */\n CliEdgeWithoutWorkerdCondition = 3121,\n /** A bot with no `cloudflare.config.ts` sets the `workerd` condition in its tsconfig. */\n CliWorkerdConditionWithoutCloudflareConfig = 3122,\n /** TypeScript could not read the project's tsconfig, or Cloudflare's config loader could not read `cloudflare.config.ts`. */\n CliConfigFileUnreadable = 3123,\n /** The CLI could not start the TypeScript compiler. */\n CliTypescriptNotStarted = 3124,\n /** A config file sets a field this bot can't set, like `entrypoint` in an edge bot's `cloudflare.config.ts`. */\n CliConfigFieldUnused = 3125,\n /** An edge bot's `compatibilityDate` is older than Cloudflare's Node compat default, and no flag turns it on. */\n CliEdgeCompatDateTooOld = 3126,\n /** An edge bot sets `no_nodejs_compat`. */\n CliEdgeNodeCompatOff = 3127,\n /** The build could not start the edge worker in workerd. */\n CliEdgeBootFailed = 3128,\n /** An edge bot's `root` holds its seedcord config. */\n CliEdgeRootHoldsConfig = 3129,\n /** An edge build found commands in code that have no deployed id on Discord. */\n CliEdgeCommandsNotDeployed = 3130,\n /** Something called the dev runtime before `start()` finished or after `stop()`. This is a bug in seedcord. */\n CliDevRuntimeNotRunning = 3131,\n /** `seedcord commands deploy` ran on a bot whose `commands.path` is `null`. */\n CliDeployNoCommandsFolder = 3132,\n /** `seedcord commands deploy` ran without `--yes` where it cannot ask first. */\n CliDeployNeedsYes = 3133,\n /** A class carrying `@RegisterCommand` builds a component that is not a command or a context menu. */\n CliCommandNotACommand = 3134,\n /** `seedcord commands clean` or `purge` could not delete some of the commands it picked. */\n CliCommandsNotDeleted = 3135,\n /** The CLI ran on Bun for an edge bot. */\n CliEdgeOnBun = 3136,\n /** An edge bot's `cloudflare.config.ts` sets no `worker`. */\n CliEdgeNoWorker = 3137,\n /** The running `seedcord` is a different install from the project's own. */\n CliNotProjectInstall = 3138,\n /** Vite's environments leave out the one seedcord runs the bot in. */\n CliViteEnvironmentMissing = 3139,\n /** A folder that `files` in `seedcord.config.ts` lists is missing or is a file. */\n CliListedFolderUnusable = 3140,\n /** Another `seedcord dev` already runs a bot on the same Discord application. */\n CliDevAlreadyRunning = 3141,\n /** The folder that holds the dev session locks belongs to another user. */\n CliDevLockFolderNotOwned = 3142,\n /** A plugin's `codegen()` threw. */\n CliPluginCodegenThrew = 3143,\n /** A plugin class with a `codegen()` is missing its `static readonly id`. */\n CliPluginCodegenNoId = 3144,\n /** A plugin's `codegen()` returned a value that codegen can't write as a type. */\n CliPluginCodegenValue = 3145,\n /** Two attachments of one plugin class returned different values at one key from `codegen()`. */\n CliPluginCodegenConflict = 3146,\n /** The text passed to `seedcord ask` isn't a question the guide search accepts. */\n CliAskBadQuestion = 3147,\n /** The guide search refused `seedcord ask` until a search limit resets. */\n CliAskHasToWait = 3148,\n /** The guide search failed for a reason other than a search limit. */\n CliAskFailed = 3149,\n\n /** A flag answers a question that the earlier answers skip. */\n CreateFlagNotApplicable = 3201,\n /** A flag has a value its question rejects. */\n CreateInvalidAnswer = 3202,\n /** The command line did not parse. */\n CreateBadUsage = 3203,\n /** The target path already has files in it. */\n CreateTargetNotEmpty = 3204,\n /** A command that create-seedcord ran exited non-zero. */\n CreateStepFailed = 3205,\n\n /** The name given to `seedcord make` can't become a file name. */\n MakeInvalidName = 3301,\n /** A template calls `importOf` on a folder that doesn't hold exactly one template file. */\n MakeImportOfUnmatched = 3302,\n /** A template uses one value as two of text, a list, and an entry with fields. */\n MakeValueUsedTwoWays = 3303,\n /** Handlebars could not parse or render a template file. */\n MakeTemplateFailed = 3304,\n /** A template calls `lookup` with a key that isn't quoted text. */\n MakeLookupDynamicKey = 3305,\n /** `seedcord make` ran without a terminal to ask its questions in. */\n MakeNeedsTerminal = 3306,\n /** `seedcord make` found no templates in the bot or its plugins. */\n MakeNoTemplates = 3307,\n /** A path `seedcord make` would write to is taken, by a file on disk or by another file of the same template. */\n MakePathTaken = 3308,\n /** A template's partial calls itself, so `seedcord make` can't tell how many levels to ask for. */\n MakePartialCallsItself = 3309\n}\n"],"mappings":";;;;AAKA,IAAY,oBAAL;;CAEH;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAGA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAGA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAGA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAGA;;CAEA;;CAEA;;CAEA;;CAEA;;CAGA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAGA;;CAGA;;CAEA;;CAEA;;CAGA;;CAEA;;CAGA;;CAEA;;CAGA;;CAGA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAGA;;CAEA;;CAGA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAGA;;CAGA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAGA;;CAEA;;CAEA;;CAEA;;CAEA;;CAGA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA;;AACJ"}
|