Class AuditLogMethods

Methods for interacting with Guild Audit Logs

Hierarchy

  • AuditLogMethods

Constructors

Methods

Properties

Constructors

  • Create a new Audit Log Method Handler

    Usually SnowTransfer creates a method handler for you, this is here for completion

    You can access the methods listed via client.auditLog.method, where client is an initialized SnowTransfer instance

    Parameters

    • requestHandler: RequestHandler

      request handler that calls the rest api

    Returns AuditLogMethods

Methods

  • Get the audit logs of the specified guild id

    Returns

    An object with audit log data

    Permissions needed Condition
    VIEW_AUDIT_LOG always

    Example

    // Get an audit log entry of user 12345678901234567 updating themself (24 is MEMBER_UPDATE)
    const client = new SnowTransfer("TOKEN")
    const data = {
    user_id: "12345678901234567",
    action_type: 24,
    }
    const channel = await client.auditLog.getAuditLog("guild id", data)

    Parameters

    • guildId: string

      id of a guild

    • Optional data: {
          action_type?: AuditLogEvent;
          before?: string;
          limit?: number;
          user_id?: string;
      }

      optional audit log filter values

      • Optional action_type?: AuditLogEvent
      • Optional before?: string
      • Optional limit?: number
      • Optional user_id?: string

    Returns Promise<AuditLog>

Properties

requestHandler: RequestHandler

Generated using TypeDoc