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

Update reloading-commands.md #1614

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions guide/additional-features/reloading-commands.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Reloading Commands

When writing your commands, you may find it tedious to restart your bot every time for testing the smallest changes. With a command handler, you can eliminate this issue and reload your commands while your bot is running.
When writing your commands, you may find it tedious to restart your bot every time for testing the smallest changes. With a command handler, you can eliminate this issue and reload your commands while your bot is still running without creating issues with users using your bot.

::: warning
ESM does not support require and clearing import cache. You can use [hot-esm](https://www.npmjs.com/package/hot-esm) to import files without cache. Windows support is experimental per [this issue](https://github.com/vinsonchuong/hot-esm/issues/33).
Expand All @@ -11,7 +11,7 @@ This section assumes you followed the [Command Handling](/creating-your-bot/comm
:::

::: warning
The reload command ideally should not be used by every user. You should deploy it as a guild command in a private guild.
The reload command ideally should not be used by every user. You should deploy it as a guild command in a private guild to have more security over powerful commands.
:::

```js
Expand All @@ -31,7 +31,7 @@ module.exports = {
};
```

First off, you need to check if the command you want to reload exists. You can do this check similarly to getting a command.
First off, you need to check if the command you want to reload exists. You can do this check similarly to fetching a command.

```js {4-9}
module.exports = {
Expand Down