diff --git a/javacord-api/src/main/java/org/javacord/api/entity/auditlog/AuditLogChangeType.java b/javacord-api/src/main/java/org/javacord/api/entity/auditlog/AuditLogChangeType.java index cd3386570..327aaed1b 100644 --- a/javacord-api/src/main/java/org/javacord/api/entity/auditlog/AuditLogChangeType.java +++ b/javacord-api/src/main/java/org/javacord/api/entity/auditlog/AuditLogChangeType.java @@ -83,6 +83,7 @@ public enum AuditLogChangeType implements Nameable { DEAF("deaf"), MUTE("mute"), NICK("nick"), + COMMUNICATION_DISABLED_UNTIL("communication_disabled_until"), // integration ENABLE_EMOTICONS("enable_emoticons"), diff --git a/javacord-core/src/main/java/org/javacord/core/entity/auditlog/AuditLogEntryImpl.java b/javacord-core/src/main/java/org/javacord/core/entity/auditlog/AuditLogEntryImpl.java index 150390fe6..d0d6ad199 100644 --- a/javacord-core/src/main/java/org/javacord/core/entity/auditlog/AuditLogEntryImpl.java +++ b/javacord-core/src/main/java/org/javacord/core/entity/auditlog/AuditLogEntryImpl.java @@ -26,6 +26,7 @@ import java.awt.Color; import java.net.MalformedURLException; import java.net.URL; +import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.List; import java.util.Objects; @@ -222,6 +223,13 @@ public AuditLogEntryImpl(AuditLog auditLog, JsonNode data) { change = new AuditLogChangeImpl<>(AuditLogChangeType.UNKNOWN, oldValue, newValue); } break; + case COMMUNICATION_DISABLED_UNTIL: + change = new AuditLogChangeImpl<>( + type, + oldValue != null ? OffsetDateTime.parse(oldValue.asText()).toInstant() : null, + newValue != null ? OffsetDateTime.parse(newValue.asText()).toInstant() : null + ); + break; case TYPE: // TODO Find a good way to both handle integers (channel type) and strings change = new AuditLogChangeImpl<>(type, oldValue, newValue);