commandkit 0.1.4 → 0.1.5-dev.20231004071120

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.js CHANGED
@@ -128,6 +128,7 @@ async function loadCommandsWithRest(props) {
128
128
  }
129
129
  }
130
130
  async function handleLoading(client, commands, devGuildIds, reloading, type) {
131
+ commands = commands.filter((cmd) => !cmd.options?.deleted);
131
132
  const devOnlyCommands = commands.filter((cmd) => cmd.options?.devOnly);
132
133
  const globalCommands = commands.filter((cmd) => !cmd.options?.devOnly);
133
134
  if (type === "dev") {
@@ -517,6 +518,11 @@ var CommandHandler = class {
517
518
  const compactFilePath = commandFilePath.split(process.cwd())[1] || commandFilePath;
518
519
  if (commandObj.default)
519
520
  commandObj = commandObj.default;
521
+ if (importedObj.default) {
522
+ commandObj.data = importedObj.default.data;
523
+ } else {
524
+ commandObj.data = importedObj.data;
525
+ }
520
526
  if (!commandObj.data) {
521
527
  console.log(
522
528
  colors_default.yellow(
package/dist/index.mjs CHANGED
@@ -98,6 +98,7 @@ async function loadCommandsWithRest(props) {
98
98
  }
99
99
  }
100
100
  async function handleLoading(client, commands, devGuildIds, reloading, type) {
101
+ commands = commands.filter((cmd) => !cmd.options?.deleted);
101
102
  const devOnlyCommands = commands.filter((cmd) => cmd.options?.devOnly);
102
103
  const globalCommands = commands.filter((cmd) => !cmd.options?.devOnly);
103
104
  if (type === "dev") {
@@ -487,6 +488,11 @@ var CommandHandler = class {
487
488
  const compactFilePath = commandFilePath.split(process.cwd())[1] || commandFilePath;
488
489
  if (commandObj.default)
489
490
  commandObj = commandObj.default;
491
+ if (importedObj.default) {
492
+ commandObj.data = importedObj.default.data;
493
+ } else {
494
+ commandObj.data = importedObj.data;
495
+ }
490
496
  if (!commandObj.data) {
491
497
  console.log(
492
498
  colors_default.yellow(
package/package.json CHANGED
@@ -1,49 +1,49 @@
1
1
  {
2
- "name": "commandkit",
3
- "description": "Beginner friendly command & event handler for Discord.js",
4
- "version": "0.1.4",
5
- "license": "MIT",
6
- "main": "./dist/index.js",
7
- "module": "./dist/index.mjs",
8
- "types": "./dist/index.d.ts",
9
- "exports": {
10
- ".": {
11
- "require": "./dist/index.js",
12
- "import": "./dist/index.mjs",
13
- "types": "./dist/index.d.ts"
14
- }
15
- },
16
- "scripts": {
17
- "lint": "tsc",
18
- "dev": "tsup --watch",
19
- "build": "tsup",
20
- "deploy": "npm publish",
21
- "deploy-dev": "npm publish --access public --tag dev",
22
- "test": "tsx tests/index.ts",
23
- "test:watch": "tsx watch tests/index.ts"
24
- },
25
- "repository": {
26
- "url": "git+https://github.com/underctrl-io/commandkit.git"
27
- },
28
- "homepage": "https://commandkit.js.org",
29
- "keywords": [
30
- "discord.js",
31
- "command handler",
32
- "event handler"
33
- ],
34
- "dependencies": {
35
- "rfdc": "^1.3.0"
36
- },
37
- "devDependencies": {
38
- "@types/node": "^20.5.9",
39
- "discord.js": "^14.13.0",
40
- "dotenv": "^16.3.1",
41
- "tsconfig": "workspace:*",
42
- "tsup": "^7.2.0",
43
- "tsx": "^3.12.8",
44
- "typescript": "^5.1.6"
45
- },
46
- "peerDependencies": {
47
- "discord.js": "^14"
2
+ "name": "commandkit",
3
+ "description": "Beginner friendly command & event handler for Discord.js",
4
+ "version": "0.1.5-dev.20231004071120",
5
+ "license": "MIT",
6
+ "main": "./dist/index.js",
7
+ "module": "./dist/index.mjs",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "require": "./dist/index.js",
12
+ "import": "./dist/index.mjs",
13
+ "types": "./dist/index.d.ts"
48
14
  }
49
- }
15
+ },
16
+ "scripts": {
17
+ "lint": "tsc",
18
+ "dev": "tsup --watch",
19
+ "build": "tsup",
20
+ "deploy": "npm publish",
21
+ "deploy-dev": "npm publish --access public --tag dev",
22
+ "test": "tsx tests/index.ts",
23
+ "test:watch": "tsx watch tests/index.ts"
24
+ },
25
+ "repository": {
26
+ "url": "git+https://github.com/underctrl-io/commandkit.git"
27
+ },
28
+ "homepage": "https://commandkit.js.org",
29
+ "keywords": [
30
+ "discord.js",
31
+ "command handler",
32
+ "event handler"
33
+ ],
34
+ "dependencies": {
35
+ "rfdc": "^1.3.0"
36
+ },
37
+ "devDependencies": {
38
+ "@types/node": "^20.5.9",
39
+ "discord.js": "^14.13.0",
40
+ "dotenv": "^16.3.1",
41
+ "tsconfig": "workspace:*",
42
+ "tsup": "^7.2.0",
43
+ "tsx": "^3.12.8",
44
+ "typescript": "^5.1.6"
45
+ },
46
+ "peerDependencies": {
47
+ "discord.js": "^14"
48
+ }
49
+ }