Class: Discorb::AuditLog

Inherits:
DiscordModel show all
Defined in:
lib/discorb/audit_logs.rb

Overview

Represents a Discord audit log.

Defined Under Namespace

Classes: Entry, Integration

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from DiscordModel

#==, #eql?

Instance Attribute Details

#entries -> Array<Discorb::AuditLog::Entry> (readonly)

Returns The entries in this audit log.

Returns:



15
16
17
# File 'lib/discorb/audit_logs.rb', line 15

def entries
  @entries
end

#threads -> Array<Discorb::ThreadChannel> (readonly)

Returns The threads in this audit log.

Returns:



13
14
15
# File 'lib/discorb/audit_logs.rb', line 13

def threads
  @threads
end

#users -> Array<Discorb::User> (readonly)

Returns The users in this audit log.

Returns:



11
12
13
# File 'lib/discorb/audit_logs.rb', line 11

def users
  @users
end

#webhooks -> Array<Discorb::Webhook> (readonly)

Returns The webhooks in this audit log.

Returns:



9
10
11
# File 'lib/discorb/audit_logs.rb', line 9

def webhooks
  @webhooks
end

Instance Method Details

#[](index) -> Discorb::AuditLog::Entry?

Gets an entry from entries.

Parameters:

  • index (Integer)

    The index of the entry.

Returns:



42
43
44
# File 'lib/discorb/audit_logs.rb', line 42

def [](index)
  @entries[index]
end

#inspect -> Object



30
31
32
# File 'lib/discorb/audit_logs.rb', line 30

def inspect
  "<#{self.class} #{@entries.length} entries>"
end