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

#action ⇒ Integer (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

#entry ⇒ AuditLogs::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

#server ⇒ Server (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_id ⇒ Integer? (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_id ⇒ Integer (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