Class: OnyxCord::Events::AuditLogEntryCreateEvent

Inherits:
Event
  • Object
show all
Defined in:
lib/onyxcord/events/guilds/audit_logs.rb

Overview

Raised whenever an audit log entry is created.

Instance Attribute Summary collapse

Attributes inherited from Event

#bot

Instance Attribute Details

#actionInteger (readonly)

Returns the raw action type of the audit log entry.

Returns:

  • (Integer)

    the raw action type of the audit log entry.



16
17
18
# File 'lib/onyxcord/events/guilds/audit_logs.rb', line 16

def action
  @action
end

#entryAuditLogs::Entry (readonly)

Returns the entry of the audit log event.

Returns:



13
14
15
# File 'lib/onyxcord/events/guilds/audit_logs.rb', line 13

def entry
  @entry
end

#serverServer (readonly)

Returns the server of the audit log event.

Returns:

  • (Server)

    the server of the audit log event.



10
11
12
# File 'lib/onyxcord/events/guilds/audit_logs.rb', line 10

def server
  @server
end

#target_idInteger? (readonly)

Returns the ID of the affected webhook, user, etc.

Returns:

  • (Integer, nil)

    the ID of the affected webhook, user, etc.



22
23
24
# File 'lib/onyxcord/events/guilds/audit_logs.rb', line 22

def target_id
  @target_id
end

#user_idInteger (readonly)

Returns the ID of the user or bot that made the entry.

Returns:

  • (Integer)

    the ID of the user or bot that made the entry.



19
20
21
# File 'lib/onyxcord/events/guilds/audit_logs.rb', line 19

def user_id
  @user_id
end