-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Modifying example to search command subfolders #1486
base: main
Are you sure you want to change the base?
Conversation
This portion of the guide is confusing because it does not work with the previous section title "Command Categories" which has the user move commands in to subcommand folders. The changes I've made allow for the full commands folder to be searched for a matching command. This will work no matter the path to the file inside the command folder.
This would require users to download the glob package using npm. As this is not stated on the page, I would recommend adding a part for installing the package. |
Added a comment about installing glob.
Good point. Added a line about installing glob. |
@@ -14,8 +14,13 @@ This section assumes you followed the [Command Handling](/creating-your-bot/comm | |||
The reload command ideally should not be used by every user. You should deploy it as a guild command in a private guild. | |||
::: | |||
|
|||
We will use the glob package to navigate our slash command file structure. This can be installed via npm by running `npm i glob` in the terminal. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will use the glob package to navigate our slash command file structure. This can be installed via npm by running `npm i glob` in the terminal. | |
You can use the glob package to navigate your slash command file structure. To install the package run `npm install glob` in the terminal. |
wording and consistency https://github.com/discordjs/guide/blob/main/CONTRIBUTING.md#youyour-instead-of-weour
Wait, you're making this change to reflect the command categories page, right? So why should we use a different approach than that page? I'd say either use |
I don't think changes like these are needed especially when the new guide is in the works. |
Just pointing out that this issue is resolved. |
This portion of the guide is confusing because it does not work with a previous section title "Command Categories" which has the user move commands in to subcommand folders.
The changes I've made allow for the full commands folder to be searched for a matching command. This will work no matter the path to the file inside the command folder.