Class: Discordrb::Events::AuditLogEntryCreateEvent

Inherits:
Event
  • Object
show all
Defined in:
lib/discordrb/events/guilds.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.



208
209
210
# File 'lib/discordrb/events/guilds.rb', line 208

def action
  @action
end

#entryAuditLogs::Entry (readonly)

Returns the entry of the audit log event.

Returns:



205
206
207
# File 'lib/discordrb/events/guilds.rb', line 205

def entry
  @entry
end

#serverServer (readonly)

Returns the server of the audit log event.

Returns:

  • (Server)

    the server of the audit log event.



202
203
204
# File 'lib/discordrb/events/guilds.rb', line 202

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.



214
215
216
# File 'lib/discordrb/events/guilds.rb', line 214

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.



211
212
213
# File 'lib/discordrb/events/guilds.rb', line 211

def user_id
  @user_id
end