Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command in subdirectory was skipped and not registered #10774

Open
schrodienieur opened this issue Feb 21, 2025 · 0 comments · May be fixed by #10775
Open

Command in subdirectory was skipped and not registered #10774

schrodienieur opened this issue Feb 21, 2025 · 0 comments · May be fixed by #10775

Comments

@schrodienieur
Copy link

Which package is this bug report for?

create-discord-bot

Issue description

Steps to reproduce:

  1. Run npm create discord-bot
  2. Select JavaScript template
  3. Create folder named utility in the commands folder.
  4. Add user command in the utility subdirectory

./commands/utility/user.js

/** @type {import('../index').Command} */
export default {
	data: {
		name: 'user',
		description: 'Provides information about the user.',
	},
	async execute(interaction) {
		await interaction.reply(`This command was run by ${interaction.user.username}.`);
	},
};
 commands
├── utility
│   ├── user.js
├── ping.js
└── index.js
  1. Set up discord token and application id in the .env file
  2. Run npm run deploy

Expected:

Successfully registered 2 commands.

Actual:

Successfully registered 1 commands.

Note: The user command was skipped.

Code sample

Versions

  • discord.js: 14.18.0
  • create-discord-bot: 1.0.0

Issue priority

Low (slightly annoying)

Which partials do you have configured?

Not applicable

Which gateway intents are you subscribing to?

Guilds

I have tested this issue on a development release

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants