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

#entriesArray<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

#threadsArray<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

#usersArray<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

#webhooksArray<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:



53
54
55
# File 'lib/discorb/audit_logs.rb', line 53

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

#inspectObject



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

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