AuditLogEntryType

Represents the event type of an AuditLogEntry.

Attributes

name : str

The name of audit log event.

The audit log's target's type.

value : int

The Discord side identifier value of the audit log event.

Class Attributes

DEFAULT_NAME : str = 'UNDEFINED'

The default name of the audit log events.

INSTANCES : dict of (int, AuditLogEntryType) items

Stores the predefined AuditLogEntryType-s. These can be accessed with their value as key.

VALUE_TYPE : type = int

The audit log events' values' type.

Every predefined audit log event can be accessed as class attribute as well:

Class attribute nameNameValueTarget type
nonenone0none
guild_updateguild update1guild
channel_createchannel create10channel
channel_updatechannel update11channel
channel_deletechannel delete12channel
channel_permission_overwrite_createchannel permission overwrite create13channel_permission_overwrite
channel_permission_overwrite_updatechannel permission overwrite update14channel_permission_overwrite
channel_permission_overwrite_deletechannel permission overwrite delete15channel_permission_overwrite
user_kickuser kick20user
user_pruneuser prune21guild
user_ban_adduser ban add22user
user_ban_removeuser ban remove23user
user_updateuser update24user
user_role_updateuser role update25user
user_moveuser move26user
user_disconnectuser disconnect27user
bot_addbot add28user
role_createrole create30role
role_updaterole update31role
role_deleterole delete32role
invite_createinvite create40invite
invite_updateinvite update41invite
invite_deleteinvite delete42invite
webhook_createwebhook create50webhook
webhook_updatewebhook update51webhook
webhook_deletewebhook delete52webhook
emoji_createemoji create60emoji
emoji_updateemoji update61emoji
emoji_deleteemoji delete62emoji
message_deletemessage delete72message
message_bulk_deletemessage bulk delete73message
message_pinmessage pin74message
message_unpinmessage unpin75message
integration_createintegration create80integration
integration_updateintegration update81integration
integration_deleteintegration delete82integration
stage_createstage create83stage
stage_updatestage update84stage
stage_deletestage delete85stage
sticker_createsticker create90sticker
sticker_updatesticker update91sticker
sticker_deletesticker delete92sticker
scheduled_event_createscheduled event create100scheduled_event
scheduled_event_updatescheduled event update101scheduled_event
scheduled_event_deletescheduled event delete102scheduled_event
thread_createthread create110channel
thread_updatethread update111channel
thread_deletethread delete112channel
application_command_permission_updateapplication command permission update121application_command
soundboard_sound_createsoundboard sound create130soundboard_sound
soundboard_sound_updatesoundboard sound update131soundboard_sound
soundboard_sound_deletesoundboard sound delete132soundboard_sound
auto_moderation_rule_createauto moderation rule create140auto_moderation_rule
auto_moderation_rule_updateauto moderation rule update141auto_moderation_rule
auto_moderation_rule_deleteauto moderation rule delete142auto_moderation_rule
auto_moderation_block_messageauto moderation block message143auto_moderation_action_execution
auto_moderation_alert_messageauto moderation alert message144auto_moderation_action_execution
auto_moderation_user_timeoutauto moderation user timeout145auto_moderation_action_execution
creator_monetization_request_createdcreator_monetization_request_created150none
creator_monetization_terms_acceptedcreator_monetization_terms_accepted151none
role_prompt_createrole_prompt_create160none
role_prompt_updaterole_prompt_update161none
role_prompt_deleterole_prompt_delete162none
onboarding_prompt_createonboarding prompt create163onboarding_prompt
onboarding_prompt_updateonboarding prompt update164onboarding_prompt
onboarding_prompt_deleteonboarding prompt delete165onboarding_prompt
onboarding_screen_createonboarding screen create166onboarding_screen
onboarding_screen_updateonboarding screen update167onboarding_screen
home_feature_itemhome_feature_item171none
home_remove_itemhome_remove_item172none
channel_status_updatechannel status update192channel
channel_status_deletechannel status delete193channel

Methods

__init__(value, name, target_type)

Creates a new audit log event and stores it at the class's .INSTANCES class attribute.

ParameterTypeDescription
value

int

The identifier value of the audit log event.

name

str

The audit log event's name.

target_type

AuditLogEntryTargetType

The audit log's target type.

get(value)

Returns the value's representation. If the value is already preinstanced, returns that, else creates a new object.

ParameterTypeDescription
value

None, .VALUE_TYPE

The value to get it's representation.

Returns

obj_ : PreinstancedBase

_from_value(value)

Creates a new audit log event object from the given value.

ParameterTypeDescription
value

.VALUE_TYPE

The value what has no representation yet.

Returns

self : AuditLogEntryType

The created audit log event.

__eq__()

Returns whether self's value equals to the other object's.

__ge__()

Returns whether self's value is greater or equal to the other object's.

__getattr__()

Drops a rich attribute error.

__gt__()

Returns whether self's value is greater than the other object's.

__hash__()

Returns the hash of the preinstanced object.

__le__()

Returns whether self's value is less or equal to the other object's.

__lt__()

Returns whether self's value is less than the other object's.

__ne__()

Returns whether self's not equals to the other object's.

__repr__()

Returns the representation of the preinstanced object.