@@ -468,6 +468,8 @@ class Command(Generic[GroupT, P, T]):
468
468
default_permissions: Optional[:class:`~discord.Permissions`]
469
469
The default permissions that can execute this command on Discord. Note
470
470
that server administrators can override this value in the client.
471
+ Setting an empty permissions field will disallow anyone except server
472
+ administrators from using the command in a guild.
471
473
472
474
Due to a Discord limitation, this does not work on subcommands.
473
475
guild_only: :class:`bool`
@@ -874,6 +876,8 @@ class ContextMenu:
874
876
default_permissions: Optional[:class:`~discord.Permissions`]
875
877
The default permissions that can execute this command on Discord. Note
876
878
that server administrators can override this value in the client.
879
+ Setting an empty permissions field will disallow anyone except server
880
+ administrators from using the command in a guild.
877
881
guild_only: :class:`bool`
878
882
Whether the command should only be usable in guild contexts.
879
883
Defaults to ``False``.
@@ -1025,6 +1029,8 @@ class shortened to 100 characters.
1025
1029
default_permissions: Optional[:class:`~discord.Permissions`]
1026
1030
The default permissions that can execute this group on Discord. Note
1027
1031
that server administrators can override this value in the client.
1032
+ Setting an empty permissions field will disallow anyone except server
1033
+ administrators from using the command in a guild.
1028
1034
1029
1035
Due to a Discord limitation, this does not work on subcommands.
1030
1036
guild_only: :class:`bool`
@@ -1828,6 +1834,9 @@ def default_permissions(**perms: bool) -> Callable[[T], T]:
1828
1834
However, an administrator can change the permissions needed to execute this command using the official
1829
1835
client. Therefore, this only serves as a hint.
1830
1836
1837
+ Setting an empty permissions field, including via calling this with no arguments, will disallow anyone
1838
+ except server administrators from using the command in a guild.
1839
+
1831
1840
This is sent to Discord server side, and is not a :func:`check`. Therefore, error handlers are not called.
1832
1841
1833
1842
Due to a Discord limitation, this decorator does nothing in subcommands and is ignored.
0 commit comments