Class: RubyCord::Guild::AuditLog

Inherits:
DiscordModel show all
Defined in:
lib/rubycord/guild/audit_logs.rb,
lib/rubycord/guild/audit_log/entry.rb,
lib/rubycord/guild/audit_log/integration.rb

Defined Under Namespace

Classes: Entry, Integration

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from DiscordModel

#==, #eql?

Instance Attribute Details

#entriesArray<RubyCord::Guild::AuditLog::Entry> (readonly)

Returns The entries in this audit log.

Returns:



17
18
19
# File 'lib/rubycord/guild/audit_logs.rb', line 17

def entries
  @entries
end

#threadsArray<RubyCord::Guild::ThreadChannel> (readonly)

Returns The threads in this audit log.

Returns:



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

def threads
  @threads
end

#usersArray<RubyCord::User> (readonly)

Returns The users in this audit log.

Returns:



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

def users
  @users
end

#webhooksArray<RubyCord::Guild::Webhook> (readonly)

Returns The webhooks in this audit log.

Returns:



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

def webhooks
  @webhooks
end

Instance Method Details

#[](index) ⇒ RubyCord::Guild::AuditLog::Entry?

Gets an entry from entries.

Parameters:

  • index (Integer)

    The index of the entry.

Returns:



55
56
57
# File 'lib/rubycord/guild/audit_logs.rb', line 55

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

#inspectObject



43
44
45
# File 'lib/rubycord/guild/audit_logs.rb', line 43

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