Class: Discorb::AuditLog::Entry
- Inherits:
-
DiscordModel
- Object
- DiscordModel
- Discorb::AuditLog::Entry
- Defined in:
- lib/discorb/audit_logs.rb
Overview
Represents an entry in an audit log.
Defined Under Namespace
Class Attribute Summary collapse
-
.converts -> Object
readonly
Returns the value of attribute converts.
-
.events -> Object
readonly
Returns the value of attribute events.
Instance Attribute Summary collapse
-
#changes -> Discorb::AuditLog::Entry::Changes
readonly
The changes in this entry.
-
#id -> Discorb::Snowflake
readonly
The ID of the entry.
-
#options -> Hash{Symbol => Object}
readonly
The optional data for this entry.
-
#target -> Discorb::Channel, ...
readonly
The target of the entry.
-
#target_id -> Discorb::Snowflake
readonly
The ID of the target of the action.
-
#type -> Symbol
readonly
These symbols will be used:.
-
#user -> Discorb::User
readonly
The user who performed the action.
-
#user_id -> Discorb::Snowflake
readonly
The ID of the user who performed the action.
Instance Method Summary collapse
-
#[](key) -> Discorb::AuditLog::Entry::Change?
Get a change with the given key.
- #inspect -> Object
Methods inherited from DiscordModel
Class Attribute Details
.converts -> Object (readonly)
Returns the value of attribute converts.
237 238 239 |
# File 'lib/discorb/audit_logs.rb', line 237 def converts @converts end |
.events -> Object (readonly)
Returns the value of attribute events.
237 238 239 |
# File 'lib/discorb/audit_logs.rb', line 237 def events @events end |
Instance Attribute Details
#changes -> Discorb::AuditLog::Entry::Changes (readonly)
Returns The changes in this entry.
111 112 113 |
# File 'lib/discorb/audit_logs.rb', line 111 def changes @changes end |
#id -> Discorb::Snowflake (readonly)
Returns The ID of the entry.
53 54 55 |
# File 'lib/discorb/audit_logs.rb', line 53 def id @id end |
#options -> Hash{Symbol => Object} (readonly)
You can use dot notation to access the data.
Returns The optional data for this entry.
117 118 119 |
# File 'lib/discorb/audit_logs.rb', line 117 def @options end |
#target -> Discorb::Channel, ... (readonly)
Returns The target of the entry.
114 115 116 |
# File 'lib/discorb/audit_logs.rb', line 114 def target @target end |
#target_id -> Discorb::Snowflake (readonly)
Returns The ID of the target of the action.
57 58 59 |
# File 'lib/discorb/audit_logs.rb', line 57 def target_id @target_id end |
#type -> Symbol (readonly)
These symbols will be used:
-
:guild_update
-
:channel_create
-
:channel_update
-
:channel_delete
-
:channel_overwrite_create
-
:channel_overwrite_update
-
:channel_overwrite_delete
-
:member_kick
-
:member_prune
-
:member_ban_add
-
:member_ban_remove
-
:member_update
-
:member_role_update
-
:member_move
-
:member_disconnect
-
:bot_add
-
:role_create
-
:role_update
-
:role_delete
-
:invite_create
-
:invite_update
-
:invite_delete
-
:webhook_create
-
:webhook_update
-
:webhook_delete
-
:emoji_create
-
:emoji_update
-
:emoji_delete
-
:message_delete
-
:message_bulk_delete
-
:message_pin
-
:message_unpin
-
:integration_create
-
:integration_update
-
:integration_delete
-
:stage_instance_create
-
:stage_instance_update
-
:stage_instance_delete
-
:sticker_create
-
:sticker_update
-
:sticker_delete
-
:guild_scheduled_event_create
-
:guild_scheduled_event_update
-
:guild_scheduled_event_delete
-
:thread_create
-
:thread_update
-
:thread_delete
-
`:application_command_permission_update“
109 110 111 |
# File 'lib/discorb/audit_logs.rb', line 109 def type @type end |
#user -> Discorb::User (readonly)
Returns The user who performed the action.
|
# File 'lib/discorb/audit_logs.rb', line 119
|
#user_id -> Discorb::Snowflake (readonly)
Returns The ID of the user who performed the action.
55 56 57 |
# File 'lib/discorb/audit_logs.rb', line 55 def user_id @user_id end |
Instance Method Details
#[](key) -> Discorb::AuditLog::Entry::Change?
Get a change with the given key.
228 229 230 |
# File 'lib/discorb/audit_logs.rb', line 228 def [](key) @changes[key] end |
#inspect -> Object
232 233 234 |
# File 'lib/discorb/audit_logs.rb', line 232 def inspect "#<#{self.class} #{@changes&.data&.length || "No"} changes>" end |