Skip to content

Commit ee7c6ef

Browse files
authored
Merge pull request #297 from Dorukyum/master
Fix TypeError when command has no permission checks
2 parents 7e80e0d + 2ef3550 commit ee7c6ef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

discord/commands/commands.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ def __init__(self, func: Callable, *args, **kwargs) -> None:
340340

341341
# Permissions
342342
self.default_permission = kwargs.get("default_permission", True)
343-
self.permissions: Optional[List[Permission]] = getattr(func, "__app_cmd_perms__", None)
343+
self.permissions: List[Permission] = getattr(func, "__app_cmd_perms__", []) + kwargs.get("permissions", [])
344344

345345

346346
def parse_options(self, params) -> List[Option]:

0 commit comments

Comments
 (0)