Add application command permissions to audit log

This commit is contained in:
z03h
2022-05-01 15:59:57 -07:00
committed by GitHub
parent 5f0cf58b2e
commit 619bc50e5d
10 changed files with 374 additions and 113 deletions

View File

@ -39,6 +39,7 @@ __all__ = (
'AppCommandThread',
'Argument',
'Choice',
'AllChannels',
)
ChoiceT = TypeVar('ChoiceT', str, int, float, Union[str, int, float])
@ -70,6 +71,32 @@ if TYPE_CHECKING:
ApplicationCommandParent = Union['AppCommand', 'AppCommandGroup']
class AllChannels:
"""Represents all channels for application command permissions.
.. versionadded:: 2.0
Attributes
-----------
id: :class:`int`
The guilds id - 1.
guild: :class:`~discord.Guild`
The guild the application command permission is for.
"""
__slots__ = (
'id',
'guild',
)
def __init__(self, guild: Guild):
self.id = guild.id - 1
self.guild = guild
def __repr__(self):
return f'<All Channels guild={self.guild}>'
class AppCommand(Hashable):
"""Represents a application command.