Class: DiscordRDA::GuildAuditLogEntryCreateEvent

Inherits:
Event
  • Object
show all
Defined in:
lib/discord_rda/event/base.rb

Instance Attribute Summary

Attributes inherited from Event

#data, #shard_id, #timestamp, #type

Instance Method Summary collapse

Methods inherited from Event

#created_at, #inspect, #to_h

Constructor Details

#initialize(data, shard_id:) ⇒ GuildAuditLogEntryCreateEvent

Returns a new instance of GuildAuditLogEntryCreateEvent.



1195
1196
1197
# File 'lib/discord_rda/event/base.rb', line 1195

def initialize(data, shard_id:)
  super('GUILD_AUDIT_LOG_ENTRY_CREATE', data, shard_id: shard_id)
end

Instance Method Details

#entryObject



1199
1200
1201
# File 'lib/discord_rda/event/base.rb', line 1199

def entry
  AuditLogEntry.new(@data)
end

#guild_idObject



1203
1204
1205
# File 'lib/discord_rda/event/base.rb', line 1203

def guild_id
  @data['guild_id'] ? Snowflake.new(@data['guild_id']) : nil
end