create-seedcord 0.1.3 → 0.3.0

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/index.mjs CHANGED
@@ -1922,7 +1922,7 @@ const chalk = createChalk();
1922
1922
  const chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 });
1923
1923
 
1924
1924
  //#endregion
1925
- //#region ../../packages/errors/dist/SeedcordError-D4QO4dr3.mjs
1925
+ //#region ../../packages/errors/dist/SeedcordError-C3HkJAhQ.mjs
1926
1926
  /**
1927
1927
  * All Seedcord error codes.
1928
1928
  */
@@ -1959,6 +1959,8 @@ let SeedcordErrorCode = /* @__PURE__ */ function(SeedcordErrorCode) {
1959
1959
  SeedcordErrorCode[SeedcordErrorCode["LifecycleTaskTimeout"] = 1106] = "LifecycleTaskTimeout";
1960
1960
  /** A host whose startup failed was started again. */
1961
1961
  SeedcordErrorCode[SeedcordErrorCode["LifecycleRestartAfterFailure"] = 1107] = "LifecycleRestartAfterFailure";
1962
+ /** The configured shutdown deadline is zero, negative, or not finite. */
1963
+ SeedcordErrorCode[SeedcordErrorCode["LifecycleInvalidShutdownDeadline"] = 1108] = "LifecycleInvalidShutdownDeadline";
1962
1964
  /** Multiple Seedcord instances were created simultaneously. */
1963
1965
  SeedcordErrorCode[SeedcordErrorCode["CoreSingletonViolation"] = 1201] = "CoreSingletonViolation";
1964
1966
  /** Plugins cannot be mutated after the core has finished initializing. */
@@ -1979,22 +1981,36 @@ let SeedcordErrorCode = /* @__PURE__ */ function(SeedcordErrorCode) {
1979
1981
  SeedcordErrorCode[SeedcordErrorCode["CoreApplicationUnavailable"] = 1209] = "CoreApplicationUnavailable";
1980
1982
  /** A generated accessor was read before startup resolved its values. */
1981
1983
  SeedcordErrorCode[SeedcordErrorCode["CoreAccessorUnresolved"] = 1210] = "CoreAccessorUnresolved";
1982
- /** Interaction middleware decorated with disallowed event filters. */
1983
- SeedcordErrorCode[SeedcordErrorCode["DecoratorInteractionEventFilter"] = 1301] = "DecoratorInteractionEventFilter";
1984
+ /** A startup or shutdown task was added to a core built by `createSeedcord`. */
1985
+ SeedcordErrorCode[SeedcordErrorCode["CoreLifecycleUnavailable"] = 1211] = "CoreLifecycleUnavailable";
1986
+ /** `emit` was called on the bus. It reaches listeners and skips every subscriber. */
1987
+ SeedcordErrorCode[SeedcordErrorCode["CoreBusEmitUnavailable"] = 1212] = "CoreBusEmitUnavailable";
1988
+ /** A command decorator passed `'config'` while `commands.guilds` is empty. */
1989
+ SeedcordErrorCode[SeedcordErrorCode["CoreCommandGuildsEmpty"] = 1213] = "CoreCommandGuildsEmpty";
1990
+ /** Discord refused the command deploy for one guild. */
1991
+ SeedcordErrorCode[SeedcordErrorCode["CoreCommandGuildDeployFailed"] = 1214] = "CoreCommandGuildDeployFailed";
1992
+ /** A plugin was attached under a group name the bot already uses. */
1993
+ SeedcordErrorCode[SeedcordErrorCode["CorePluginGroupTaken"] = 1215] = "CorePluginGroupTaken";
1994
+ /** A plugin was attached at a name that holds a group of plugins. */
1995
+ SeedcordErrorCode[SeedcordErrorCode["CorePluginKeyHoldsGroup"] = 1216] = "CorePluginKeyHoldsGroup";
1996
+ /** A plugin key is empty, has an empty part, or carries more than one dot. */
1997
+ SeedcordErrorCode[SeedcordErrorCode["CorePluginKeyMalformed"] = 1217] = "CorePluginKeyMalformed";
1984
1998
  /** A command decorator attempted to re-register an existing command scope. */
1985
- SeedcordErrorCode[SeedcordErrorCode["DecoratorCommandAlreadyRegistered"] = 1302] = "DecoratorCommandAlreadyRegistered";
1999
+ SeedcordErrorCode[SeedcordErrorCode["DecoratorCommandAlreadyRegistered"] = 1301] = "DecoratorCommandAlreadyRegistered";
1986
2000
  /** A global command decorator specified guild IDs, which is not allowed. */
1987
- SeedcordErrorCode[SeedcordErrorCode["DecoratorCommandGlobalWithGuilds"] = 1303] = "DecoratorCommandGlobalWithGuilds";
2001
+ SeedcordErrorCode[SeedcordErrorCode["DecoratorCommandGlobalWithGuilds"] = 1302] = "DecoratorCommandGlobalWithGuilds";
1988
2002
  /** A guild command decorator omitted the required guild ID list. */
1989
- SeedcordErrorCode[SeedcordErrorCode["DecoratorCommandGuildWithoutGuilds"] = 1304] = "DecoratorCommandGuildWithoutGuilds";
2003
+ SeedcordErrorCode[SeedcordErrorCode["DecoratorCommandGuildWithoutGuilds"] = 1303] = "DecoratorCommandGuildWithoutGuilds";
1990
2004
  /** Middleware priority provided by the decorator was not a finite number. */
1991
- SeedcordErrorCode[SeedcordErrorCode["DecoratorInvalidMiddlewarePriority"] = 1305] = "DecoratorInvalidMiddlewarePriority";
2005
+ SeedcordErrorCode[SeedcordErrorCode["DecoratorInvalidMiddlewarePriority"] = 1304] = "DecoratorInvalidMiddlewarePriority";
1992
2006
  /** A WebhookLog subclass is missing its `@WebhookUrl` decorator. */
1993
- SeedcordErrorCode[SeedcordErrorCode["DecoratorWebhookUrlMissing"] = 1306] = "DecoratorWebhookUrlMissing";
2007
+ SeedcordErrorCode[SeedcordErrorCode["DecoratorWebhookUrlMissing"] = 1305] = "DecoratorWebhookUrlMissing";
2008
+ /** A middleware decorator was given an empty filter array. */
2009
+ SeedcordErrorCode[SeedcordErrorCode["DecoratorEmptyMiddlewareFilter"] = 1306] = "DecoratorEmptyMiddlewareFilter";
1994
2010
  /** Two interaction handlers registered the same route within a scope. */
1995
2011
  SeedcordErrorCode[SeedcordErrorCode["InteractionDuplicateRoute"] = 1401] = "InteractionDuplicateRoute";
1996
- /** Two different interaction middleware classes share a class name. */
1997
- SeedcordErrorCode[SeedcordErrorCode["InteractionDuplicateMiddleware"] = 1402] = "InteractionDuplicateMiddleware";
2012
+ /** Two different middleware classes share a class name. */
2013
+ SeedcordErrorCode[SeedcordErrorCode["DuplicateMiddleware"] = 1402] = "DuplicateMiddleware";
1998
2014
  /** A route manifest row gives an export name its module does not have. */
1999
2015
  SeedcordErrorCode[SeedcordErrorCode["InteractionRouteExportMissing"] = 1403] = "InteractionRouteExportMissing";
2000
2016
  /** A subscriber manifest row specifies an export that does not extend `Subscriber`. */
@@ -2015,17 +2031,17 @@ let SeedcordErrorCode = /* @__PURE__ */ function(SeedcordErrorCode) {
2015
2031
  SeedcordErrorCode[SeedcordErrorCode["CustomIdInvalidPrefix"] = 1601] = "CustomIdInvalidPrefix";
2016
2032
  /** A customId field name is integer-like, which JS would silently reorder. */
2017
2033
  SeedcordErrorCode[SeedcordErrorCode["CustomIdReservedFieldName"] = 1602] = "CustomIdReservedFieldName";
2018
- /** A oneOf() field was declared with no choices. */
2034
+ /** A oneOf() or someOf() field was declared with no choices. */
2019
2035
  SeedcordErrorCode[SeedcordErrorCode["CustomIdEmptyChoices"] = 1603] = "CustomIdEmptyChoices";
2020
2036
  /** An int() field was declared with min greater than max. */
2021
2037
  SeedcordErrorCode[SeedcordErrorCode["CustomIdInvalidBounds"] = 1604] = "CustomIdInvalidBounds";
2022
- /** A value passed to encode() is outside its field's allowed range. */
2023
- SeedcordErrorCode[SeedcordErrorCode["CustomIdValueOutOfRange"] = 1605] = "CustomIdValueOutOfRange";
2038
+ /** A field rejected the value given to encode(). */
2039
+ SeedcordErrorCode[SeedcordErrorCode["CustomIdValueRejected"] = 1605] = "CustomIdValueRejected";
2024
2040
  /** An encoded customId exceeds Discord's 100-character limit. */
2025
2041
  SeedcordErrorCode[SeedcordErrorCode["CustomIdWireTooLong"] = 1606] = "CustomIdWireTooLong";
2026
2042
  /** A field name is declared more than once in the same customId chain. */
2027
2043
  SeedcordErrorCode[SeedcordErrorCode["CustomIdDuplicateFieldName"] = 1607] = "CustomIdDuplicateFieldName";
2028
- /** A component handler is missing its route decorator (\@ButtonRoute / \@ModalRoute / \@SelectMenuRoute). */
2044
+ /** A component handler is missing the route decorator that matches its base. */
2029
2045
  SeedcordErrorCode[SeedcordErrorCode["CustomIdHandlerRouteMissing"] = 1608] = "CustomIdHandlerRouteMissing";
2030
2046
  /** match() received a decoded route with no matching arm. */
2031
2047
  SeedcordErrorCode[SeedcordErrorCode["CustomIdMatchArmMissing"] = 1609] = "CustomIdMatchArmMissing";
@@ -2039,6 +2055,22 @@ let SeedcordErrorCode = /* @__PURE__ */ function(SeedcordErrorCode) {
2039
2055
  SeedcordErrorCode[SeedcordErrorCode["EventMiddlewareNameUnavailable"] = 1613] = "EventMiddlewareNameUnavailable";
2040
2056
  /** An autocomplete payload carried no focused option. */
2041
2057
  SeedcordErrorCode[SeedcordErrorCode["AutocompleteNoFocusedOption"] = 1614] = "AutocompleteNoFocusedOption";
2058
+ /** A context menu handler's match() has no arm for the command name that fired. */
2059
+ SeedcordErrorCode[SeedcordErrorCode["ContextMenuMatchArmMissing"] = 1615] = "ContextMenuMatchArmMissing";
2060
+ /** No field in the submitted modal carries the requested custom id. */
2061
+ SeedcordErrorCode[SeedcordErrorCode["ModalFieldNotFound"] = 1616] = "ModalFieldNotFound";
2062
+ /** A modal field getter was called on a field of another kind. */
2063
+ SeedcordErrorCode[SeedcordErrorCode["ModalFieldWrongKind"] = 1617] = "ModalFieldWrongKind";
2064
+ /** Nothing was picked in a modal field read as required. */
2065
+ SeedcordErrorCode[SeedcordErrorCode["ModalFieldEmpty"] = 1618] = "ModalFieldEmpty";
2066
+ /** A channel select field picked a channel outside the types getSelectedChannels() allows. */
2067
+ SeedcordErrorCode[SeedcordErrorCode["ModalFieldChannelType"] = 1619] = "ModalFieldChannelType";
2068
+ /** A customId was minted under an older shape of the same definition. */
2069
+ SeedcordErrorCode[SeedcordErrorCode["CustomIdWireStale"] = 1620] = "CustomIdWireStale";
2070
+ /** A customId wire is corrupt, truncated, or was minted by a different definition. */
2071
+ SeedcordErrorCode[SeedcordErrorCode["CustomIdWireInvalid"] = 1621] = "CustomIdWireInvalid";
2072
+ /** `dispatch.require()` was called for a key nothing wrote on this dispatch. */
2073
+ SeedcordErrorCode[SeedcordErrorCode["DispatchStateMissing"] = 1622] = "DispatchStateMissing";
2042
2074
  /** A Cooldown gate was given a duration string that is not a well-formed positive duration. */
2043
2075
  SeedcordErrorCode[SeedcordErrorCode["GateInvalidCooldownDuration"] = 1701] = "GateInvalidCooldownDuration";
2044
2076
  /** A paginator source was given a perPage that is not a positive integer. */
@@ -2057,6 +2089,8 @@ let SeedcordErrorCode = /* @__PURE__ */ function(SeedcordErrorCode) {
2057
2089
  SeedcordErrorCode[SeedcordErrorCode["PluginOptionsRejected"] = 2001] = "PluginOptionsRejected";
2058
2090
  /** Two or more plugins threw while disposing. */
2059
2091
  SeedcordErrorCode[SeedcordErrorCode["PluginDisposeFailures"] = 2002] = "PluginDisposeFailures";
2092
+ /** A plugin declared a lifecycle timeout that is not a positive, finite number of milliseconds. */
2093
+ SeedcordErrorCode[SeedcordErrorCode["PluginInvalidLifecycleTimeout"] = 2003] = "PluginInvalidLifecycleTimeout";
2060
2094
  /** Mongoose service class is missing the `@RegisterMongooseService` decorator. */
2061
2095
  SeedcordErrorCode[SeedcordErrorCode["PluginMongooseServiceDecoratorMissing"] = 2101] = "PluginMongooseServiceDecoratorMissing";
2062
2096
  /** Mongoose client failed to establish a connection. */
@@ -2145,6 +2179,8 @@ let SeedcordErrorCode = /* @__PURE__ */ function(SeedcordErrorCode) {
2145
2179
  SeedcordErrorCode[SeedcordErrorCode["CliTunnelUnreachable"] = 3125] = "CliTunnelUnreachable";
2146
2180
  /** A config field is present with the wrong shape. */
2147
2181
  SeedcordErrorCode[SeedcordErrorCode["CliConfigInvalidField"] = 3126] = "CliConfigInvalidField";
2182
+ /** A class carrying `@RegisterCommand` threw while codegen constructed it. */
2183
+ SeedcordErrorCode[SeedcordErrorCode["CliCodegenCommandConstructorThrew"] = 3127] = "CliCodegenCommandConstructorThrew";
2148
2184
  /** A create prompt was cancelled (Ctrl-C), and nothing has been written yet. */
2149
2185
  SeedcordErrorCode[SeedcordErrorCode["CreateCancelled"] = 3201] = "CreateCancelled";
2150
2186
  /** A flag supplied an answer for a question the earlier answers skip. */
@@ -2196,6 +2232,7 @@ const messages = {
2196
2232
  [1105]: (phase, failures) => `Phase ${phase} completed with ${failures} failed task${failures === 1 ? "" : "s"}.`,
2197
2233
  [1106]: (taskName, timeout) => `Task "${taskName}" timed out after ${timeout}ms.`,
2198
2234
  [1107]: () => "Startup failed and this host cannot start again. Construct a new instance.",
2235
+ [1108]: (declared) => `lifecycle.shutdownDeadline is ${declared}. Pass a positive number of milliseconds, or omit it for the default.`,
2199
2236
  [1201]: () => "Seedcord can only be instantiated once. Use the existing instance instead.",
2200
2237
  [1202]: () => "Cannot attach a plugin after initialization.",
2201
2238
  [1203]: (key) => `Plugin with key "${key}" already exists.`,
@@ -2203,17 +2240,24 @@ const messages = {
2203
2240
  [1205]: (controllerName, pathKind) => `${controllerName} was instantiated without a ${pathKind} path.`,
2204
2241
  [1206]: (file) => `${file} threw while importing.`,
2205
2242
  [1207]: (dir) => `${dir} could not be read.`,
2243
+ [1215]: (head, key) => `${paint.sky(head)} is already taken on this bot, so ${paint.sky(key)} cannot nest under it. Pick another group name.`,
2244
+ [1217]: (key, reason) => `${paint.sky(key)} ${reason} Write a group and a plugin name around one dot, like 'services.users'.`,
2245
+ [1216]: (key) => `${paint.sky(key)} already holds a group of plugins. Attach this one under a name of its own.`,
2206
2246
  [1208]: (key) => `Plugin key "${key}" is a channel the framework logs on. Pick another key.`,
2207
2247
  [1209]: () => "The bot's application id resolves during startup. You read it before that. Read it inside a handler, inside a plugin's ready(), or after start() resolves.",
2208
2248
  [1210]: (accessor, key) => `${accessor}.${key} has no value yet. ${accessor} fills during startup, and a read at the top of a file runs before that.`,
2209
- [1301]: () => "Interaction middleware cannot specify event filters.",
2210
- [1302]: (commandName, existingScope, requestedScope) => `Command "${commandName}" is already registered as a "${existingScope}" command and cannot be re-registered as a "${requestedScope}" command.`,
2211
- [1303]: () => "RegisterCommand(\"global\") cannot have guilds specified.",
2212
- [1304]: () => "RegisterCommand(\"guild\") requires a non-empty guilds array.",
2213
- [1305]: () => "Middleware priority must be a finite number.",
2214
- [1306]: (className) => `${className} extends WebhookLog and needs a @WebhookUrl decorator naming its env var.`,
2249
+ [1211]: (accessor) => `core.${accessor}.addTask() does not work here. This bot was built with createSeedcord() whose build never runs startup or shutdown. Your task would never run. Do the work inside your handler instead. To use startup and shutdown, run the bot on node with new Seedcord(config).start().`,
2250
+ [1212]: (event) => `core.bus.emit('${event}') would reach your on() listeners and skip every Subscriber class. Call core.bus.publish('${event}', data) to run both.`,
2251
+ [1213]: (commandName) => `${paint.sky(commandName)} registers to the 'config' guilds while commands.guilds is empty.\nList the ids under commands.guilds, or pass them to @RegisterCommand('guild', [...]).`,
2252
+ [1214]: (guildId) => `Discord refused the command deploy for guild ${paint.sky(guildId)}.\nCheck that the id is right, and that your bot is in that server.`,
2253
+ [1301]: (commandName, existingCall, requestedCall) => `${paint.sky(commandName)} is registered twice, first with ${existingCall}, then with ${requestedCall}. Keep one.`,
2254
+ [1302]: () => "RegisterCommand(\"global\") cannot have guilds specified.",
2255
+ [1303]: () => "RegisterCommand(\"guild\") requires a non-empty guilds array.",
2256
+ [1304]: () => "Middleware priority must be a finite number.",
2257
+ [1305]: (className) => `${className} extends WebhookLog and needs a @WebhookUrl decorator naming its env var.`,
2258
+ [1306]: (key) => `\`${key}\` was given an empty array. Drop the key to run the middleware on everything.`,
2215
2259
  [1401]: (route, first, second) => `Two interaction handlers resolve to the same route \`${route}\`. Registered by ${first} and ${second}. Rename one.`,
2216
- [1402]: (name) => `Two different interaction middleware classes share the name \`${name}\`. Rename one so they do not collide.`,
2260
+ [1402]: (name) => `Two different middleware classes share the name \`${name}\`. Rename one so they do not collide.`,
2217
2261
  [1403]: (route, exportName, from) => `Route \`${route}\` loads \`${exportName}\` from ${from}, which exports no such name.`,
2218
2262
  [1404]: (keys, exportName, from) => `Subscriber row for \`${keys}\` loads \`${exportName}\` from ${from}, which does not extend Subscriber.`,
2219
2263
  [1405]: (route, from) => `Route \`${route}\` failed to import ${from}.`,
@@ -2224,18 +2268,26 @@ const messages = {
2224
2268
  [1505]: (method, routeId) => `The interaction callback for ${paint.sky(`${method}()`)} returned no message. (route ${paint.mute(routeId)})`,
2225
2269
  [1601]: (prefix) => `customId prefix ${JSON.stringify(prefix)} must be a non-empty string without a colon or control character.`,
2226
2270
  [1602]: (field) => `customId field name ${JSON.stringify(field)} is integer-like, which JS reorders. Use a non-numeric name.`,
2227
- [1603]: (field) => `customId field ${JSON.stringify(field)} uses oneOf() with no choices.`,
2271
+ [1603]: (field, method) => `customId field ${JSON.stringify(field)} uses ${method}() with no choices. Make the field nullable or provide at least one choice.`,
2228
2272
  [1604]: (field, min, max) => `customId field ${JSON.stringify(field)} has min ${min} greater than max ${max}.`,
2229
- [1605]: (field, value) => `customId field ${JSON.stringify(field)} got value ${value} outside its allowed range.`,
2273
+ [1605]: (field, expected, value) => `customId field ${JSON.stringify(field)} expects ${expected}, got ${value}.`,
2230
2274
  [1606]: (length) => `Encoded customId is ${length} characters, Discord allows at most 100.`,
2231
2275
  [1607]: (field) => `customId field ${JSON.stringify(field)} is already defined in this chain.`,
2232
- [1608]: (className) => `${className} is missing its route decorator (@ButtonRoute, @ModalRoute, or @SelectMenuRoute).`,
2276
+ [1608]: (className) => `${className} is missing its route decorator. Add the one that matches its base, for example @ButtonRoute or @UserMenuRoute.`,
2233
2277
  [1609]: (prefix) => `match() has no arm for the decoded route ${JSON.stringify(prefix)}.`,
2278
+ [1620]: (prefix) => `customId ${JSON.stringify(prefix)} was minted under an older shape of this definition. Adding, removing, changing, or moving a field changes the layout hash.`,
2279
+ [1621]: (detail) => `customId could not be decoded. ${detail}.`,
2234
2280
  [1610]: (route) => `match() has no arm for the command route ${JSON.stringify(route)}.`,
2235
2281
  [1611]: (field) => `match() has no arm for the focused field ${JSON.stringify(field)}.`,
2236
2282
  [1612]: (event) => `match() has no arm for the event ${JSON.stringify(event)}.`,
2283
+ [1615]: (name) => `match() has no arm for the context menu command ${JSON.stringify(name)}.`,
2237
2284
  [1613]: () => `this.eventName is only available on middleware the controller constructed with a fired event name.`,
2238
2285
  [1614]: () => `Autocomplete payload has no focused option.`,
2286
+ [1616]: (customId) => `The submitted modal carries no field with the custom id ${JSON.stringify(customId)}. Check it against the id you gave the component when you built the modal.`,
2287
+ [1617]: (customId, kind, getter) => getter ? `Modal field ${JSON.stringify(customId)} holds ${kind}. Read it with ${getter}().` : `Modal field ${JSON.stringify(customId)} holds ${kind}. No getter reads that kind.`,
2288
+ [1618]: (customId) => `Modal field ${JSON.stringify(customId)} carries no selection. Build the component as required, or read it without the required argument.`,
2289
+ [1619]: (customId, picked, allowed) => `Modal field ${JSON.stringify(customId)} picked a ${picked} channel. This read allows ${allowed}.`,
2290
+ [1622]: (key) => `Nothing set \`${key}\` on this dispatch. Check that the middleware writing it is registered and that its filter covers this dispatch.`,
2239
2291
  [1701]: (input) => `Cooldown duration ${JSON.stringify(input)} is not valid. Pass a number of seconds or a duration string like '30m', '24h', or '500ms'.`,
2240
2292
  [1801]: (perPage) => `perPage must be a positive integer, got ${perPage}.`,
2241
2293
  [1802]: (count) => `A control row holds at most 5 buttons, got ${count}.`,
@@ -2245,6 +2297,7 @@ const messages = {
2245
2297
  [1902]: () => "Color must be within the range 0 to 16777215 (0xffffff).",
2246
2298
  [2001]: (pluginName, reason) => `${pluginName} rejected its options, ${reason.replace(/\.$/, "")}.`,
2247
2299
  [2002]: (count) => `${count} plugins failed to dispose.`,
2300
+ [2003]: (pluginName, field, declared) => `${pluginName} declared lifecycle ${field}.timeout as ${declared}. Pass a positive number of milliseconds, or omit it for the default.`,
2248
2301
  [2101]: (className) => `Missing @RegisterMongooseService on ${className}.`,
2249
2302
  [2102]: (databaseName) => databaseName ? `Could not connect to MongoDB (${databaseName}).` : "Could not connect to MongoDB.",
2250
2303
  [2103]: () => "Failed to disconnect from MongoDB cleanly during shutdown.",
@@ -2278,6 +2331,7 @@ const messages = {
2278
2331
  [3113]: (targetPath, reason) => `Failed to write bootstrap file at ${targetPath}: ${reason}`,
2279
2332
  [3114]: (route, firstFile, secondFile) => `Two commands resolve to the same slash route \`${route}\`. Defined in ${firstFile} and ${secondFile}. Rename one.`,
2280
2333
  [3115]: (dir, reason) => `Could not read the commands directory ${dir} during codegen. ${reason}`,
2334
+ [3127]: (name, file, reason) => `${name} threw while codegen constructed it. Fix its constructor in ${file}. ${reason}`,
2281
2335
  [3116]: (kind, name, firstFile, secondFile) => `Two ${kind} context-menu commands share the name \`${name}\`. Defined in ${firstFile} and ${secondFile}. Rename one.`,
2282
2336
  [3117]: (reason) => `Could not resolve the application from the bot token. ${reason}`,
2283
2337
  [3118]: () => "No guilds given. Pass --guild <ids...> or --all-guilds. Global commands are never touched.",
@@ -2321,8 +2375,8 @@ function resolveMessage(code, args) {
2321
2375
  function formatErrorName(name, _identifier, code) {
2322
2376
  return `${paint.coral.bold(name)}[${paint.mute(code)}]`;
2323
2377
  }
2324
- const kIdentifier = Symbol.for("seedcord.errors.identifier");
2325
- const CODED = Symbol.for("seedcord.errors.coded");
2378
+ const kIdentifier = Symbol.for("seedcord:errors:identifier");
2379
+ const CODED = Symbol.for("seedcord:errors:coded");
2326
2380
  function brand(prototype) {
2327
2381
  Object.defineProperty(prototype, CODED, { value: true });
2328
2382
  }
@@ -2411,7 +2465,7 @@ function isSeedcordError(error, type, code) {
2411
2465
 
2412
2466
  //#endregion
2413
2467
  //#region src/cli/banner.ts
2414
- function banner(version = "0.1.3") {
2468
+ function banner(version = "0.3.0") {
2415
2469
  const wordmark = `${paint.flesh.bold("seed")}${paint.rind.bold("cord")}${paint.mute(" create")}`;
2416
2470
  if (version === void 0) return wordmark;
2417
2471
  return `${wordmark}${paint.pith(` • v${version}`)}`;
@@ -2423,10 +2477,10 @@ const ENV_NAME = "DISCORD_BOT_TOKEN";
2423
2477
  /** @internal */
2424
2478
  function validateDiscordToken(raw) {
2425
2479
  if (raw === null || raw === void 0) throw new SeedcordError(1005, [ENV_NAME]);
2426
- if (typeof raw !== "string") throw new SeedcordError(1006, [ENV_NAME]);
2480
+ if (typeof raw !== "string") throw new SeedcordTypeError(1006, [ENV_NAME]);
2427
2481
  const value = raw.trim();
2428
2482
  if (value === "") throw new SeedcordError(1005, [ENV_NAME]);
2429
- if (!/^[A-Za-z\d_-]{24,}\.[A-Za-z\d_-]{6,}\.[A-Za-z\d_-]{27,}$/.test(value)) throw new SeedcordError(1006, [ENV_NAME]);
2483
+ if (!/^[A-Za-z\d_-]{24,}\.[A-Za-z\d_-]{6,}\.[A-Za-z\d_-]{27,}$/.test(value)) throw new SeedcordTypeError(1006, [ENV_NAME]);
2430
2484
  return value;
2431
2485
  }
2432
2486
 
@@ -11067,6 +11121,7 @@ const DEV_PACKAGES = [
11067
11121
  "@seedcord/eslint-config",
11068
11122
  "@seedcord/tsconfig",
11069
11123
  "@types/node",
11124
+ "jiti",
11070
11125
  "prettier",
11071
11126
  "seedcord",
11072
11127
  "typescript@~6.0"