Skip to content

Commit 6927707

Browse files
authored
Fix Permission->CommandPermission rename for ContextMenuCommand (#672)
* fix permission rename for ContextMenuCommand * fix docstring
1 parent a807e9a commit 6927707

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

discord/commands/commands.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -948,7 +948,7 @@ class ContextMenuCommand(ApplicationCommand):
948948
The ids of the guilds where this command will be registered.
949949
default_permission: :class:`bool`
950950
Whether the command is enabled by default when it is added to a guild.
951-
permissions: List[:class:`.Permission`]
951+
permissions: List[:class:`.CommandPermission`]
952952
The permissions for this command.
953953
954954
.. note::
@@ -999,7 +999,7 @@ def __init__(self, func: Callable, *args, **kwargs) -> None:
999999
self.validate_parameters()
10001000

10011001
self.default_permission = kwargs.get("default_permission", True)
1002-
self.permissions: List[Permission] = getattr(func, "__app_cmd_perms__", []) + kwargs.get("permissions", [])
1002+
self.permissions: List[CommandPermission] = getattr(func, "__app_cmd_perms__", []) + kwargs.get("permissions", [])
10031003
if self.permissions and self.default_permission:
10041004
self.default_permission = False
10051005

0 commit comments

Comments
 (0)