hikari.audit_logs
#
Application and entities that are used to describe audit logs on Discord.
AuditLog #
Bases: Sequence[AuditLogEntry]
Represents a guilds audit log's page.
entries class-attribute
instance-attribute
#
entries: Mapping[Snowflake, AuditLogEntry] = field(repr=False)
A mapping of snowflake IDs to the audit log's entries.
integrations class-attribute
instance-attribute
#
integrations: Mapping[Snowflake, PartialIntegration] = field(repr=False)
A mapping of the partial objects of integrations found in this audit log.
threads class-attribute
instance-attribute
#
threads: Mapping[Snowflake, GuildThreadChannel] = field(repr=False)
A mapping of the objects of threads found in this audit log.
users class-attribute
instance-attribute
#
A mapping of the objects of users found in this audit log.
webhooks class-attribute
instance-attribute
#
webhooks: Mapping[Snowflake, PartialWebhook] = field(repr=False)
A mapping of the objects of webhooks found in this audit log.
AuditLogChange #
Represents a change made to an audit log entry's target entity.
AuditLogChangeKey #
Bases: str
, Enum
Commonly known and documented keys for audit log change objects.
Others may exist. These should be expected to default to the raw string Discord provided us. These are defined for documentation purposes and can be treated as regular strings for all other purposes.
ADD_ROLE_TO_MEMBER class-attribute
instance-attribute
#
ADD_ROLE_TO_MEMBER = '$add'
Role added to a member.
AFK_CHANNEL_ID class-attribute
instance-attribute
#
AFK_CHANNEL_ID = 'afk_channel_id'
Afk Channel ID.
APPLICATION_ID class-attribute
instance-attribute
#
APPLICATION_ID = 'application_id'
Application ID.
AUTO_ARCHIVE_DURATION class-attribute
instance-attribute
#
AUTO_ARCHIVE_DURATION = 'auto_archive_duration'
Auto Archive Duration.
COLOUR class-attribute
instance-attribute
#
COLOUR = COLOR
Alias for hikari.audit_logs.AuditLogChangeKey.COLOR
.
COMMUNICATION_DISABLED_UNTIL class-attribute
instance-attribute
#
COMMUNICATION_DISABLED_UNTIL = 'communication_disabled_until'
The datetime when a timeout will expire.
DEFAULT_AUTO_ARCHIVE_DURATION class-attribute
instance-attribute
#
DEFAULT_AUTO_ARCHIVE_DURATION = 'default_auto_archive_duration'
Default Auto Archive Duration.
DEFAULT_MESSAGE_NOTIFICATIONS class-attribute
instance-attribute
#
DEFAULT_MESSAGE_NOTIFICATIONS = 'default_message_notifications'
Default Message Notifications.
DISCOVERY_SPLASH_HASH class-attribute
instance-attribute
#
DISCOVERY_SPLASH_HASH = 'discovery_splash_hash'
Discovery Splash Hash.
ENABLE_EMOTICONS class-attribute
instance-attribute
#
ENABLE_EMOTICONS = 'enable_emoticons'
Enable Emoticons.
EXPIRE_BEHAVIOR class-attribute
instance-attribute
#
EXPIRE_BEHAVIOR = 'expire_behavior'
Expire Behavior.
EXPIRE_GRACE_PERIOD class-attribute
instance-attribute
#
EXPIRE_GRACE_PERIOD = 'expire_grace_period'
Expire Grace Period.
EXPLICIT_CONTENT_FILTER class-attribute
instance-attribute
#
EXPLICIT_CONTENT_FILTER = 'explicit_content_filter'
Explicit Content Filter.
PERMISSION_OVERWRITES class-attribute
instance-attribute
#
PERMISSION_OVERWRITES = 'permission_overwrites'
Permission Overwrites.
PREFERRED_LOCALE class-attribute
instance-attribute
#
PREFERRED_LOCALE = 'preferred_locale'
Preferred Locale.
PRUNE_DELETE_DAYS class-attribute
instance-attribute
#
PRUNE_DELETE_DAYS = 'prune_delete_days'
Prune Delete Days.
PUBLIC_UPDATES_CHANNEL_ID class-attribute
instance-attribute
#
PUBLIC_UPDATES_CHANNEL_ID = 'public_updates_channel_id'
Public Updates Channel ID.
RATE_LIMIT_PER_USER class-attribute
instance-attribute
#
RATE_LIMIT_PER_USER = 'rate_limit_per_user'
Rate Limit Per User.
REMOVE_ROLE_FROM_MEMBER class-attribute
instance-attribute
#
REMOVE_ROLE_FROM_MEMBER = '$remove'
Role removed from a member.
RULES_CHANNEL_ID class-attribute
instance-attribute
#
RULES_CHANNEL_ID = 'rules_channel_id'
Rules Channel ID.
SYSTEM_CHANNEL_ID class-attribute
instance-attribute
#
SYSTEM_CHANNEL_ID = 'system_channel_id'
System Channel ID.
VANITY_URL_CODE class-attribute
instance-attribute
#
VANITY_URL_CODE = 'vanity_url_code'
Vanity Url Code.
VERIFICATION_LEVEL class-attribute
instance-attribute
#
VERIFICATION_LEVEL = 'verification_level'
Verification Level.
WIDGET_CHANNEL_ID class-attribute
instance-attribute
#
WIDGET_CHANNEL_ID = 'widget_channel_id'
Widget Channel ID.
WIDGET_ENABLED class-attribute
instance-attribute
#
WIDGET_ENABLED = 'widget_enabled'
Widget Enabled.
AuditLogEntry #
Bases: Unique
Represents an entry in a guild's audit log.
action_type class-attribute
instance-attribute
#
action_type: Union[AuditLogEventType, int] = field(eq=False, hash=False, repr=True)
The type of action this entry represents.
app class-attribute
instance-attribute
#
Client application that models may use for procedures.
changes class-attribute
instance-attribute
#
changes: Sequence[AuditLogChange] = field(eq=False, hash=False, repr=False)
A sequence of the changes made to hikari.audit_logs.AuditLogEntry.target_id
.
guild_id class-attribute
instance-attribute
#
ID of the guild this audit log entry is for.
id class-attribute
instance-attribute
#
The ID of this entity.
options class-attribute
instance-attribute
#
options: Optional[BaseAuditLogEntryInfo] = field(eq=False, hash=False, repr=False)
Extra information about this entry. Only be provided for certain event_type
.
reason class-attribute
instance-attribute
#
The reason for this change, if set (between 0-512 characters).
target_id class-attribute
instance-attribute
#
The ID of the entity affected by this change, if applicable.
user_id class-attribute
instance-attribute
#
The ID of the user who made this change.
fetch_user async
#
Fetch the user who made this change.
RETURNS | DESCRIPTION |
---|---|
Optional[User] | The user who made this change, if available. |
RAISES | DESCRIPTION |
---|---|
UnauthorizedError | If you are unauthorized to make the request (invalid/missing token). |
NotFoundError | If the user is not found. |
RateLimitTooLongError | Raised in the event that a rate limit occurs that is longer than |
InternalServerError | If an internal error occurs on Discord while handling the request. |
BaseAuditLogEntryInfo #
ChannelOverwriteEntryInfo #
Bases: BaseAuditLogEntryInfo
, Unique
Represents the extra information for overwrite related audit log entries.
Will be attached to the overwrite create, update and delete audit log entries.
id class-attribute
instance-attribute
#
The ID of this entity.
role_name class-attribute
instance-attribute
#
The name of the role this overwrite targets, if it targets a role.
type class-attribute
instance-attribute
#
type: Union[PermissionOverwriteType, int] = field(repr=True)
The type of entity this overwrite targets.
MemberDisconnectEntryInfo #
Bases: BaseAuditLogEntryInfo
Extra information for the voice chat member disconnect entry.
MemberMoveEntryInfo #
Bases: MemberDisconnectEntryInfo
Extra information for the voice chat based member move entry.
channel_id class-attribute
instance-attribute
#
The channel that the member(s) have been moved to.
fetch_channel async
#
fetch_channel() -> GuildVoiceChannel
Fetch the guild voice based channel where the member(s) have been moved to.
RETURNS | DESCRIPTION |
---|---|
GuildVoiceChannel | The guild voice based channel where the member(s) have been moved to. |
RAISES | DESCRIPTION |
---|---|
UnauthorizedError | If you are unauthorized to make the request (invalid/missing token). |
ForbiddenError | If you are missing the |
NotFoundError | If the channel is not found. |
RateLimitTooLongError | Raised in the event that a rate limit occurs that is longer than |
InternalServerError | If an internal error occurs on Discord while handling the request. |
MemberPruneEntryInfo #
Bases: BaseAuditLogEntryInfo
Extra information attached to guild prune log entries.
delete_member_days class-attribute
instance-attribute
#
The timedelta of how many days members were pruned for inactivity based on.
MessageBulkDeleteEntryInfo #
Bases: BaseAuditLogEntryInfo
Extra information for the message bulk delete audit entry.
MessageDeleteEntryInfo #
Bases: MessageBulkDeleteEntryInfo
Extra information attached to the message delete audit entry.
channel_id class-attribute
instance-attribute
#
The ID of guild text based channel where these message(s) were deleted.
fetch_channel async
#
fetch_channel() -> TextableGuildChannel
Fetch the guild text based channel where these message(s) were deleted.
RETURNS | DESCRIPTION |
---|---|
TextableGuildChannel | The guild text based channel where these message(s) were deleted. |
RAISES | DESCRIPTION |
---|---|
UnauthorizedError | If you are unauthorized to make the request (invalid/missing token). |
ForbiddenError | If you are missing the |
NotFoundError | If the channel is not found. |
RateLimitTooLongError | Raised in the event that a rate limit occurs that is longer than |
InternalServerError | If an internal error occurs on Discord while handling the request. |
MessagePinEntryInfo #
Bases: BaseAuditLogEntryInfo
The extra information for message pin related audit log entries.
Will be attached to the message pin and message unpin audit log entries.
channel_id class-attribute
instance-attribute
#
The ID of the text based channel where a pinned message is being targeted.
message_id class-attribute
instance-attribute
#
The ID of the message that's being pinned or unpinned.
fetch_channel async
#
fetch_channel() -> TextableChannel
Fetch The channel where this message was pinned or unpinned.
RETURNS | DESCRIPTION |
---|---|
TextableChannel | The channel where this message was pinned or unpinned. |
RAISES | DESCRIPTION |
---|---|
UnauthorizedError | If you are unauthorized to make the request (invalid/missing token). |
ForbiddenError | If you are missing the |
NotFoundError | If the channel is not found. |
RateLimitTooLongError | Raised in the event that a rate limit occurs that is longer than |
InternalServerError | If an internal error occurs on Discord while handling the request. |
fetch_message async
#
fetch_message() -> Message
Fetch the object of the message that's being pinned or unpinned.
RETURNS | DESCRIPTION |
---|---|
Message | The message that's being pinned or unpinned. |
RAISES | DESCRIPTION |
---|---|
UnauthorizedError | If you are unauthorized to make the request (invalid/missing token). |
ForbiddenError | If you are missing the |
NotFoundError | If the message is not found. |
RateLimitTooLongError | Raised in the event that a rate limit occurs that is longer than |
InternalServerError | If an internal error occurs on Discord while handling the request. |