Class: LibDiscord::AuditLog

Inherits:
Resource show all
Defined in:
lib/lib_discord/audit_log.rb

Overview

Audit Logs Resource

Do not instantiate an AuditLog directly. Instead request one from an instance of Client.

client = LibDiscord::Client.new("Bot auth.token")
a = client["audit_log"]

Instance Method Summary collapse

Methods inherited from Resource

#initialize

Constructor Details

This class inherits a constructor from LibDiscord::Resource

Instance Method Details

#get_guild_audit_log(guild_id:, params: {}) ⇒ Response

Parameters:

Returns:

Raises:

  • (TimeoutError)

    if the HTTP request times out

  • (ConstraintError)

    if params cannot be coerced into a valid query parameters string

See Also:



32
33
34
# File 'lib/lib_discord/audit_log.rb', line 32

def get_guild_audit_log(guild_id:, params: {})
  send_request(:get, "/guilds/#{guild_id}/audit-logs", params:)
end