DiscordLua
discorddiscord
v1.2.4
Install

GuildAuditLogEntry

Class
On this page

GuildAuditLogEntry is a DiscordLua class representing a Discord resource. Obtain it from a manager, an event payload, or the constructor when one is documented below.

class Module 1.2.4 Source

Properties

GuildAuditLogEntry.action

# readonly
Name
action
Type
any
Access
readonly
Description
Instance field GuildAuditLogEntry.action. Read it after the object is constructed or wrapped from Gateway/REST data.
Availability
Populated from the Gateway/REST payload or constructor for this GuildAuditLogEntry.

GuildAuditLogEntry.actionType

# readonly
Name
actionType
Type
any
Access
readonly
Description
Instance field GuildAuditLogEntry.actionType. Read it after the object is constructed or wrapped from Gateway/REST data.
Availability
Populated from the Gateway/REST payload or constructor for this GuildAuditLogEntry.

GuildAuditLogEntry.changes

# readonly
Name
changes
Type
any
Access
readonly
Description
Instance field GuildAuditLogEntry.changes. Read it after the object is constructed or wrapped from Gateway/REST data.
Availability
Populated from the Gateway/REST payload or constructor for this GuildAuditLogEntry.

GuildAuditLogEntry.client

# readonly
Name
client
Type
any
Access
readonly
Description
Owning Client instance used for REST, cache, and event dispatch.
Availability
Populated from the Gateway/REST payload or constructor for this GuildAuditLogEntry.

GuildAuditLogEntry.executor

# readonly
Name
executor
Type
any
Access
readonly
Description
Instance field GuildAuditLogEntry.executor. Read it after the object is constructed or wrapped from Gateway/REST data.
Availability
Populated from the Gateway/REST payload or constructor for this GuildAuditLogEntry.

GuildAuditLogEntry.executorId

# readonly
Name
executorId
Type
any
Access
readonly
Description
Instance field GuildAuditLogEntry.executorId. Read it after the object is constructed or wrapped from Gateway/REST data.
Availability
Populated from the Gateway/REST payload or constructor for this GuildAuditLogEntry.

GuildAuditLogEntry.extra

# readonly
Name
extra
Type
any
Access
readonly
Description
Instance field GuildAuditLogEntry.extra. Read it after the object is constructed or wrapped from Gateway/REST data.
Availability
Populated from the Gateway/REST payload or constructor for this GuildAuditLogEntry.

GuildAuditLogEntry.guild

# readonly
Name
guild
Type
any
Access
readonly
Description
Guild this GuildAuditLogEntry belongs to, when the payload included a guild id.
Availability
Populated from the Gateway/REST payload or constructor for this GuildAuditLogEntry.

GuildAuditLogEntry.guildId

# readonly
Name
guildId
Type
any
Access
readonly
Description
Instance field GuildAuditLogEntry.guildId. Read it after the object is constructed or wrapped from Gateway/REST data.
Availability
Populated from the Gateway/REST payload or constructor for this GuildAuditLogEntry.

GuildAuditLogEntry.id

# readonly
Name
id
Type
any
Access
readonly
Description
Snowflake id of this GuildAuditLogEntry.
Availability
Populated from the Gateway/REST payload or constructor for this GuildAuditLogEntry.

GuildAuditLogEntry.options

# readonly
Name
options
Type
any
Access
readonly
Description
Instance field GuildAuditLogEntry.options. Read it after the object is constructed or wrapped from Gateway/REST data.
Availability
Populated from the Gateway/REST payload or constructor for this GuildAuditLogEntry.

GuildAuditLogEntry.raw

# readonly
Name
raw
Type
any
Access
readonly
Description
Instance field GuildAuditLogEntry.raw. Read it after the object is constructed or wrapped from Gateway/REST data.
Availability
Populated from the Gateway/REST payload or constructor for this GuildAuditLogEntry.

GuildAuditLogEntry.reason

# readonly
Name
reason
Type
any
Access
readonly
Description
Instance field GuildAuditLogEntry.reason. Read it after the object is constructed or wrapped from Gateway/REST data.
Availability
Populated from the Gateway/REST payload or constructor for this GuildAuditLogEntry.

GuildAuditLogEntry.targetId

# readonly
Name
targetId
Type
any
Access
readonly
Description
Instance field GuildAuditLogEntry.targetId. Read it after the object is constructed or wrapped from Gateway/REST data.
Availability
Populated from the Gateway/REST payload or constructor for this GuildAuditLogEntry.

GuildAuditLogEntry.targetType

# readonly
Name
targetType
Type
any
Access
readonly
Description
Instance field GuildAuditLogEntry.targetType. Read it after the object is constructed or wrapped from Gateway/REST data.
Availability
Populated from the Gateway/REST payload or constructor for this GuildAuditLogEntry.

Methods

GuildAuditLogEntry.actionType()

# static

Performs action type on this GuildAuditLogEntry. Call it from bot code when you need that operation on the current object.

Signature

GuildAuditLogEntry.actionType(action)

Parameters

NameTypeRequiredBehavior
action any required Passed through to the implementation as written.

Returns

GuildAuditLogEntry — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a GuildAuditLogEntry
GuildAuditLogEntry.actionType(action)

GuildAuditLogEntry:createdAt()

#

Create dAt through REST and cache the result when the request succeeds. Pass function(err, result) to handle failures without raising.

Signature

GuildAuditLogEntry:createdAt()

Parameters

No parameters.

Returns

GuildAuditLogEntry — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a GuildAuditLogEntry
object:createdAt()

GuildAuditLogEntry:createdTimestamp()

#

Create dTimestamp through REST and cache the result when the request succeeds. Pass function(err, result) to handle failures without raising.

Signature

GuildAuditLogEntry:createdTimestamp()

Parameters

No parameters.

Returns

GuildAuditLogEntry — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a GuildAuditLogEntry
object:createdTimestamp()

GuildAuditLogEntry:isAction()

#

Predicate that returns whether this GuildAuditLogEntry matches isAction. Use it to branch before calling type-specific methods.

Signature

GuildAuditLogEntry:isAction(action)

Parameters

NameTypeRequiredBehavior
action any required Passed through to the implementation as written.

Returns

GuildAuditLogEntry — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a GuildAuditLogEntry
object:isAction(action)

GuildAuditLogEntry:isUpdate()

#

Predicate that returns whether this GuildAuditLogEntry matches isUpdate. Use it to branch before calling type-specific methods.

Signature

GuildAuditLogEntry:isUpdate()

Parameters

No parameters.

Returns

any.

Example

lua
local discord = require("discord")
-- object is a GuildAuditLogEntry
object:isUpdate()

GuildAuditLogEntry:target()

#

Performs target on this GuildAuditLogEntry. Call it from bot code when you need that operation on the current object.

Signature

GuildAuditLogEntry:target()

Parameters

No parameters.

Returns

any.

Example

lua
local discord = require("discord")
-- object is a GuildAuditLogEntry
object:target()

GuildAuditLogEntry.targetType()

# static

Performs target type on this GuildAuditLogEntry. Call it from bot code when you need that operation on the current object.

Signature

GuildAuditLogEntry.targetType(action)

Parameters

NameTypeRequiredBehavior
action any required Passed through to the implementation as written.

Returns

any.

Example

lua
local discord = require("discord")
-- object is a GuildAuditLogEntry
GuildAuditLogEntry.targetType(action)

GuildAuditLogEntry:toJSON()

#

Serialize this GuildAuditLogEntry into a Lua table suitable for REST or debugging.

Signature

GuildAuditLogEntry:toJSON()

Parameters

No parameters.

Returns

any.

Example

lua
local discord = require("discord")
-- object is a GuildAuditLogEntry
object:toJSON()

Static members

  • GuildAuditLogEntry.Targets

Examples

Obtain this object from a manager, wrap helper, or event payload — it is not constructed directly in typical bot code.

ActionRow · Activity · ActivityInstance · ActivityLocation · AnonymousGuild · ApplicationCommand · ApplicationRoleConnectionMetadata · Attachment

Version: discord 1.2.4 · runtime 1.0.0

Search Ctrl K Navigate Open Esc