mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-10-22 16:32:59 +00:00
Implement Application Command Permissions models
This commit is contained in:
@@ -3528,13 +3528,9 @@ AuditLogDiff
|
||||
|
||||
.. attribute:: app_command_permissions
|
||||
|
||||
A list of application command permission tuples that represents a
|
||||
target and a :class:`bool` for said target.
|
||||
The permissions of the app command.
|
||||
|
||||
The first element is the object being targeted, which can either
|
||||
be a :class:`Member`, :class:`abc.GuildChannel`,
|
||||
:class:`~discord.app_commands.AllChannels`, or :class:`Role`.
|
||||
:type: List[Tuple[target, :class:`bool`]]
|
||||
:type: :class:`~discord.app_commands.AppCommandPermissions`
|
||||
|
||||
.. this is currently missing the following keys: reason and application_id
|
||||
I'm not sure how to about porting these
|
||||
|
@@ -121,6 +121,22 @@ AppCommandThread
|
||||
.. autoclass:: discord.app_commands.AppCommandThread()
|
||||
:members:
|
||||
|
||||
AppCommandPermissions
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. attributetable:: discord.app_commands.AppCommandPermissions
|
||||
|
||||
.. autoclass:: discord.app_commands.AppCommandPermissions()
|
||||
:members:
|
||||
|
||||
GuildAppCommandPermissions
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. attributetable:: discord.app_commands.GuildAppCommandPermissions
|
||||
|
||||
.. autoclass:: discord.app_commands.GuildAppCommandPermissions()
|
||||
:members:
|
||||
|
||||
Argument
|
||||
~~~~~~~~~~
|
||||
|
||||
@@ -360,6 +376,22 @@ Enumerations
|
||||
|
||||
A message context menu command.
|
||||
|
||||
.. class:: AppCommandPermissionType
|
||||
|
||||
The application command's permission type.
|
||||
|
||||
.. versionadded:: 2.0
|
||||
|
||||
.. attribute:: role
|
||||
|
||||
The permission is for a role.
|
||||
.. attribute:: channel
|
||||
|
||||
The permission is for one or all channels.
|
||||
.. attribute:: user
|
||||
|
||||
The permission is for a user.
|
||||
|
||||
.. _discord_ui_kit:
|
||||
|
||||
Bot UI Kit
|
||||
|
Reference in New Issue
Block a user