Skip to content

Commit 93fc094

Browse files
Set default_permission to False when permissions exist
1 parent 87d4c1c commit 93fc094

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

discord/commands/commands.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,9 @@ def __init__(self, func: Callable, *args, **kwargs) -> None:
341341
# Permissions
342342
self.default_permission = kwargs.get("default_permission", True)
343343
self.permissions: List[Permission] = getattr(func, "__app_cmd_perms__", []) + kwargs.get("permissions", [])
344-
344+
if self.permissions and self.default_permission:
345+
self.default_permission = False
346+
345347

346348
def parse_options(self, params) -> List[Option]:
347349
final_options = []

0 commit comments

Comments
 (0)