Skip to content

Commit 3526d6f

Browse files
committed
Add note on @everyone permission.
1 parent 7c9550c commit 3526d6f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

discord_slash/utils/manage_commands.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,9 @@ def create_permission(id:int, id_type: int, permission: typing.Union[bool, Slash
323323
:param id_type: Type of the id, :class:`..model.SlashCommandPermissionsType`.
324324
:param permission: State of the permission. ``True`` to allow access, ``False`` to disallow access.
325325
:return: dict
326+
327+
.. note::
328+
For @everyone permission, set id_type as role and id as guild id.
326329
"""
327330
if not isinstance(id_type, int) or isinstance(id_type, bool): #Bool values are a subclass of int
328331
original_type = id_type
@@ -349,7 +352,7 @@ def create_multi_ids_permission(ids: typing.List[int], id_type: int, permission:
349352

350353
def generate_permissions(
351354
allowed_roles: typing.List[int] = None, allowed_users: typing.List[int] = None,
352-
disallowed_roles: typing.List[int] = None, disallowed_users: typing.List[int] = None
355+
disallowed_roles: typing.List[int] = None, disallowed_users: typing.List[int] = None
353356
):
354357
"""
355358
Creates a list of permissions.

0 commit comments

Comments
 (0)