From e3f3bc262dc2a65dc5deab198dd23d0ff5ae541d Mon Sep 17 00:00:00 2001 From: Kyle Yannelli Date: Mon, 4 Mar 2024 00:55:05 -0500 Subject: [PATCH] Fix incorrect `is` methods in user voice state events --- .../core/event/user/UserChangeDeafenedEventImpl.java | 5 ++--- .../javacord/core/event/user/UserChangeMutedEventImpl.java | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/javacord-core/src/main/java/org/javacord/core/event/user/UserChangeDeafenedEventImpl.java b/javacord-core/src/main/java/org/javacord/core/event/user/UserChangeDeafenedEventImpl.java index b6a85d765c..4633214c16 100644 --- a/javacord-core/src/main/java/org/javacord/core/event/user/UserChangeDeafenedEventImpl.java +++ b/javacord-core/src/main/java/org/javacord/core/event/user/UserChangeDeafenedEventImpl.java @@ -25,12 +25,11 @@ public UserChangeDeafenedEventImpl(Member newMember, Member oldMember) { @Override public boolean isNewDeafened() { - // TODO This is wrong. - return newMember.isSelfDeafened(); + return newMember.isDeafened(); } @Override public boolean isOldDeafened() { - return oldMember.isSelfDeafened(); + return oldMember.isDeafened(); } } diff --git a/javacord-core/src/main/java/org/javacord/core/event/user/UserChangeMutedEventImpl.java b/javacord-core/src/main/java/org/javacord/core/event/user/UserChangeMutedEventImpl.java index 610f6896e8..5f3a16e7d9 100644 --- a/javacord-core/src/main/java/org/javacord/core/event/user/UserChangeMutedEventImpl.java +++ b/javacord-core/src/main/java/org/javacord/core/event/user/UserChangeMutedEventImpl.java @@ -25,11 +25,11 @@ public UserChangeMutedEventImpl(Member newMember, Member oldMember) { @Override public boolean isNewMuted() { - return newMember.getServer().isSelfMuted(newMember.getUser()); + return newMember.isMuted(); } @Override public boolean isOldMuted() { - return !isNewMuted(); + return oldMember.isMuted(); } }