create-commandkit 1.1.4-dev.20250330125519 → 1.1.4-dev.20250403165008

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/LICENSE ADDED
@@ -0,0 +1,5 @@
1
+ Copyright 2025 Avraj Sahota
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so.
4
+
5
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "create-commandkit",
3
3
  "description": "Effortlessly create a CommandKit project",
4
- "version": "1.1.4-dev.20250330125519",
4
+ "version": "1.1.4-dev.20250403165008",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
7
7
  "bin": "./dist/index.js",
@@ -27,12 +27,6 @@
27
27
  "directory": "packages/create-commandkit"
28
28
  },
29
29
  "homepage": "https://commandkit.dev",
30
- "scripts": {
31
- "lint": "tsc --noEmit",
32
- "dev": "tsup --watch",
33
- "build": "tsup",
34
- "publish-package": "npm publish"
35
- },
36
30
  "dependencies": {
37
31
  "@clack/prompts": "^0.7.0",
38
32
  "fs-extra": "^11.1.1",
@@ -43,8 +37,14 @@
43
37
  "@types/fs-extra": "^11.0.4",
44
38
  "@types/gradient-string": "^1.1.5",
45
39
  "@types/node": "^20.11.6",
46
- "tsconfig": "workspace:*",
47
40
  "tsup": "^8.0.1",
48
- "typescript": "^5.3.3"
41
+ "typescript": "^5.3.3",
42
+ "tsconfig": "0.0.0"
43
+ },
44
+ "scripts": {
45
+ "lint": "tsc --noEmit",
46
+ "dev": "tsup --watch",
47
+ "build": "tsup",
48
+ "publish-package": "npm publish"
49
49
  }
50
50
  }
@@ -13,6 +13,7 @@
13
13
  "noUncheckedIndexedAccess": true,
14
14
  "removeComments": true,
15
15
  "allowJs": true,
16
+ "checkJs": false,
16
17
  "strict": true,
17
18
  "alwaysStrict": true,
18
19
  "noEmit": true,
@@ -10,13 +10,8 @@ export const command = {
10
10
  * @param {import('commandkit').SlashCommandContext} ctx
11
11
  */
12
12
  export const chatInput = async (ctx) => {
13
- /**
14
- * @type {import('commandkit').Localization<'ping'>}
15
- */
16
- const { t } = ctx.locale();
17
-
18
13
  const latency = (ctx.client.ws.ping ?? -1).toString();
19
- const response = await t('ping_response', { latency });
14
+ const response = `Pong! Latency: ${latency}ms`;
20
15
 
21
16
  await ctx.interaction.reply(response);
22
17
  };
@@ -25,13 +20,8 @@ export const chatInput = async (ctx) => {
25
20
  * @param {import('commandkit').MessageCommandContext} ctx
26
21
  */
27
22
  export const message = async (ctx) => {
28
- /**
29
- * @type {import('commandkit').Localization<'ping'>}
30
- */
31
- const { t } = ctx.locale();
32
-
33
23
  const latency = (ctx.client.ws.ping ?? -1).toString();
34
- const response = await t('ping_response', { latency });
24
+ const response = `Pong! Latency: ${latency}ms`;
35
25
 
36
26
  await ctx.message.reply(response);
37
27
  };
@@ -6,19 +6,15 @@ export const command: CommandData = {
6
6
  };
7
7
 
8
8
  export const chatInput: SlashCommand = async (ctx) => {
9
- const { t } = ctx.locale<'ping'>();
10
-
11
9
  const latency = (ctx.client.ws.ping ?? -1).toString();
12
- const response = await t('ping_response', { latency });
10
+ const response = `Pong! Latency: ${latency}ms`;
13
11
 
14
12
  await ctx.interaction.reply(response);
15
13
  };
16
14
 
17
15
  export const message: MessageCommand = async (ctx) => {
18
- const { t } = ctx.locale<'ping'>();
19
-
20
16
  const latency = (ctx.client.ws.ping ?? -1).toString();
21
- const response = await t('ping_response', { latency });
17
+ const response = `Pong! Latency: ${latency}ms`;
22
18
 
23
19
  await ctx.message.reply(response);
24
20
  };
@@ -1,9 +0,0 @@
1
- {
2
- "command": {
3
- "name": "ping",
4
- "description": "Ping the bot to check if it's online."
5
- },
6
- "translations": {
7
- "ping_response": "The ping is `{latency}ms`."
8
- }
9
- }
@@ -1,9 +0,0 @@
1
- {
2
- "command": {
3
- "name": "ping",
4
- "description": "Ping the bot to check if it's online."
5
- },
6
- "translations": {
7
- "ping_response": "The ping is `{latency}ms`."
8
- }
9
- }