discordjs / Commando

Official command framework for discord.js
Apache License 2.0
497 stars 243 forks source link

Enhancement registerCommandsIn (#407) #409

Closed S222em closed 2 years ago

S222em commented 3 years ago
.registerCommandsIn({ dirname: path.join(__dirname, 'commands'), subdirs: ['warnSystem', 'punishments'] });

Added ability to add subdirectories, for an easier life if there are a lot of files present.

├── commands/
│   └── moderation/
│           └── warnSystem/
│                    └── warn.js
│           └── punishments/
│                   └── punishments.js
│           └── ban.js
│
└── index.js

If the name of the file matches one of the subdirectories it will iterate over it once more.

See #407