You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,11 +36,13 @@ Use the `/htop` command to view a live list of the most resource-intensive proce
36
36
The `/htop` command is restricted to a specific Discord user ID for security reasons. Only the designated user can run this command to view system processes.
37
37
38
38
The command code is located at [`src/commands/htop.js`](./src/commands/htop.js).
39
+
To specify who can run the command, update the `ALLOWED_USER_ID` or `ALLOWED_ROLE_ID` constants in `src/commands/htop.js`:
40
+
- If both are set, the command will allow access if the user matches either the user ID or the role ID (logical OR).
39
41
40
-
To customize which user can execute the command, update the `ALLOWED_USER_ID` constant in the command's code:
41
42
42
43
```js
43
44
constALLOWED_USER_ID="123456789012345678"; // REPLACE WITH YOUR USER ID
45
+
constALLOWED_ROLE_ID="123456789012345678"; // REPLACE WITH YOUR ROLE ID
0 commit comments