AuditLog

AuditLog

Represents an audit log entry.

Constructor

new AuditLog(client, data, options)

Description:
  • Creates a structure for an audit log entry.

Source:
See:
Parameters:
Name Type Description
client Client

The client instance.

data Object

Audit log data from Discord.

options Object

Additional options for this structure.

Properties
Name Type Attributes Description
users Array.<Object> <nullable>

Resolved users who are involved with the audit log entries.

guildId String

The ID of the guild that this audit log belongs to.

Members

(readonly) actionType :Number

Description:
  • The type of action that occurred.

Source:

The type of action that occurred.

Type:
  • Number

(readonly, nullable) changes :Object

Description:
  • The changes in this audit log entry.

Source:

The changes in this audit log entry.

Type:
  • Object

(readonly, nullable) channel :TextChannel|VoiceChannel

Description:
  • The channel involved with this audit log entry.

Source:

The channel involved with this audit log entry.

Type:

(readonly, nullable) channelId :String

Description:
  • The channel id involved with this audit log entry.

Source:

The channel id involved with this audit log entry.

Type:
  • String

(readonly, nullable) count :Number

Description:
  • The count of this type of audit log entry.

Source:

The count of this type of audit log entry.

Type:
  • Number

(readonly, nullable) deleteMemberDays :Number

Description:
  • The inactivity period for when members are purged.

Source:

The inactivity period for when members are purged.

Type:
  • Number

(readonly, nullable) executor :User

Description:
  • The executor user involved with this audit log entry.

Source:

The executor user involved with this audit log entry.

Type:

(readonly, nullable) executorId :String

Description:
  • The executor user involved with this audit log entry.

Source:

The executor user involved with this audit log entry.

Type:
  • String

(readonly, nullable) guild :Guild

Description:
  • The guild that this audit log belongs to.

Source:

The guild that this audit log belongs to.

Type:

(readonly) guildId :String

Description:
  • The ID of the guild that this audit log belongs to.

Source:

The ID of the guild that this audit log belongs to.

Type:
  • String

(readonly) id :String

Description:
  • The id of the audit log entry.

Source:

The id of the audit log entry.

Type:
  • String

(readonly, nullable) membersRemoved :Number

Description:
  • The number of members removed for when members are purged.

Source:

The number of members removed for when members are purged.

Type:
  • Number

(readonly, nullable) reason :String

Description:
  • The reason for this audit log entry.

Source:

The reason for this audit log entry.

Type:
  • String

(readonly, nullable) specialId :String

Description:
  • The id of the overwritten entity.

Source:

The id of the overwritten entity.

Type:
  • String

(readonly, nullable) specialType :Number

Description:
  • The type of the overwritten entity - role ("0") or member ("1")

Source:

The type of the overwritten entity - role ("0") or member ("1")

Type:
  • Number

(readonly, nullable) status :String

Description:
  • The new voice channel status.

Source:

The new voice channel status.

Type:
  • String

(readonly, nullable) target :User

Description:
  • The target user involved with this audit log entry.

Source:

The target user involved with this audit log entry.

Type:

(readonly, nullable) targetId :String

Description:
  • The id of the target user.

Source:

The id of the target user.

Type:
  • String

Methods

toJSON(format) → {Object}

Description:
  • Returns the JSON representation of this structure.

Source:
Parameters:
Name Type Description
format Number

The format to return the data in.

Returns:
Type
Object

toString()

Source: