Skip to content

Commit

Permalink
Merge pull request Pycord-Development#297 from Dorukyum/master
Browse files Browse the repository at this point in the history
Fix TypeError when command has no permission checks
  • Loading branch information
BobDotCom authored Oct 21, 2021
2 parents 7e80e0d + 2ef3550 commit ee7c6ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion discord/commands/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ def __init__(self, func: Callable, *args, **kwargs) -> None:

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


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

0 comments on commit ee7c6ef

Please sign in to comment.