We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7c350ce commit c3ec80bCopy full SHA for c3ec80b
src/command.js
@@ -17,6 +17,8 @@ class Command {
17
this.category = command.category;
18
this.hidden = command.hidden || false;
19
20
+ this.permissionless = !!command.permissionless;
21
+
22
if (command.arguments) {
23
this.arguments = command.arguments.map(arg => {
24
if (arg instanceof argTypes.generic) {
src/index.js
@@ -105,7 +105,7 @@ function parse(command, pass) {
105
106
let success = true;
107
108
- if (argsObj.testPermission) {
+ if (argsObj.testPermission && cmdSource.permissionless) {
109
const cmdPerm = "commands." + (cmdSource.category ? cmdSource.category + "." : "") + cmdSource.originalName;
110
if (!argsObj.testPermission(cmdPerm)) {
111
success = false;
0 commit comments