create-seedcord 0.1.2-next.0 → 0.1.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/index.mjs +13 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
- package/templates/package.json.hbs +1 -0
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-
|
|
1925
|
+
//#region ../../packages/errors/dist/SeedcordError-D4QO4dr3.mjs
|
|
1926
1926
|
/**
|
|
1927
1927
|
* All Seedcord error codes.
|
|
1928
1928
|
*/
|
|
@@ -1939,6 +1939,12 @@ let SeedcordErrorCode = /* @__PURE__ */ function(SeedcordErrorCode) {
|
|
|
1939
1939
|
SeedcordErrorCode[SeedcordErrorCode["ConfigMissingEnv"] = 1005] = "ConfigMissingEnv";
|
|
1940
1940
|
/** An environment variable is present and fails validation. */
|
|
1941
1941
|
SeedcordErrorCode[SeedcordErrorCode["ConfigInvalidEnv"] = 1006] = "ConfigInvalidEnv";
|
|
1942
|
+
/** A command usable in a guild is registered without the `Guilds` intent that caches guilds. */
|
|
1943
|
+
SeedcordErrorCode[SeedcordErrorCode["MissingGuildsIntent"] = 1007] = "MissingGuildsIntent";
|
|
1944
|
+
/** The running Node version is below the range seedcord declares in `engines`. */
|
|
1945
|
+
SeedcordErrorCode[SeedcordErrorCode["UnsupportedNodeVersion"] = 1008] = "UnsupportedNodeVersion";
|
|
1946
|
+
/** `DISCORD_BOT_TOKEN` passed its shape check and carries no readable application id. */
|
|
1947
|
+
SeedcordErrorCode[SeedcordErrorCode["ConfigTokenUnreadable"] = 1009] = "ConfigTokenUnreadable";
|
|
1942
1948
|
/** Attempted to add lifecycle tasks after startup already completed. */
|
|
1943
1949
|
SeedcordErrorCode[SeedcordErrorCode["LifecycleAddAfterCompletion"] = 1101] = "LifecycleAddAfterCompletion";
|
|
1944
1950
|
/** Attempted to add lifecycle tasks while startup is still running. */
|
|
@@ -1969,7 +1975,7 @@ let SeedcordErrorCode = /* @__PURE__ */ function(SeedcordErrorCode) {
|
|
|
1969
1975
|
SeedcordErrorCode[SeedcordErrorCode["CoreDirectoryUnreadable"] = 1207] = "CoreDirectoryUnreadable";
|
|
1970
1976
|
/** A plugin was attached under a key the framework logs on. */
|
|
1971
1977
|
SeedcordErrorCode[SeedcordErrorCode["CorePluginReservedChannel"] = 1208] = "CorePluginReservedChannel";
|
|
1972
|
-
/**
|
|
1978
|
+
/** The application id was read before startup resolved it. */
|
|
1973
1979
|
SeedcordErrorCode[SeedcordErrorCode["CoreApplicationUnavailable"] = 1209] = "CoreApplicationUnavailable";
|
|
1974
1980
|
/** A generated accessor was read before startup resolved its values. */
|
|
1975
1981
|
SeedcordErrorCode[SeedcordErrorCode["CoreAccessorUnresolved"] = 1210] = "CoreAccessorUnresolved";
|
|
@@ -2180,6 +2186,9 @@ const messages = {
|
|
|
2180
2186
|
[1002]: (envKey) => `${envKey} is not a well-formed Discord webhook url.`,
|
|
2181
2187
|
[1003]: (envKey) => `The webhook behind ${envKey} does not exist on Discord.`,
|
|
2182
2188
|
[1001]: (count, failures) => `Could not resolve ${count} configured emoji${count === 1 ? "" : "s"} at startup.\n${failures}`,
|
|
2189
|
+
[1009]: () => "DISCORD_BOT_TOKEN carries no readable application id. Discord builds the first part of a bot token from that id, so a token failing here is truncated or mistyped. Copy it again from your application's Bot page.",
|
|
2190
|
+
[1007]: (commands) => `Add GatewayIntentBits.Guilds to clientOptions.intents. Without it discord.js doesn't cache any guild, so interaction.guild is null inside these commands: ${commands}.`,
|
|
2191
|
+
[1008]: (required, running) => `seedcord requires Node ${required} and this process runs ${running}. Upgrade Node before starting the bot.`,
|
|
2183
2192
|
[1101]: () => "Cannot add tasks after startup sequence has already completed.",
|
|
2184
2193
|
[1102]: () => "Cannot add tasks while startup sequence is in progress.",
|
|
2185
2194
|
[1103]: () => "Cannot remove tasks while startup sequence is in progress.",
|
|
@@ -2195,7 +2204,7 @@ const messages = {
|
|
|
2195
2204
|
[1206]: (file) => `${file} threw while importing.`,
|
|
2196
2205
|
[1207]: (dir) => `${dir} could not be read.`,
|
|
2197
2206
|
[1208]: (key) => `Plugin key "${key}" is a channel the framework logs on. Pick another key.`,
|
|
2198
|
-
[1209]: () => "The bot's application id
|
|
2207
|
+
[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.",
|
|
2199
2208
|
[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.`,
|
|
2200
2209
|
[1301]: () => "Interaction middleware cannot specify event filters.",
|
|
2201
2210
|
[1302]: (commandName, existingScope, requestedScope) => `Command "${commandName}" is already registered as a "${existingScope}" command and cannot be re-registered as a "${requestedScope}" command.`,
|
|
@@ -2402,7 +2411,7 @@ function isSeedcordError(error, type, code) {
|
|
|
2402
2411
|
|
|
2403
2412
|
//#endregion
|
|
2404
2413
|
//#region src/cli/banner.ts
|
|
2405
|
-
function banner(version = "0.1.
|
|
2414
|
+
function banner(version = "0.1.3") {
|
|
2406
2415
|
const wordmark = `${paint.flesh.bold("seed")}${paint.rind.bold("cord")}${paint.mute(" create")}`;
|
|
2407
2416
|
if (version === void 0) return wordmark;
|
|
2408
2417
|
return `${wordmark}${paint.pith(` • v${version}`)}`;
|