Skip to content

Commit e60428d

Browse files
committed
Fire both guild events when switching VCs
1 parent dd139e4 commit e60428d

File tree

3 files changed

+1
-24
lines changed

3 files changed

+1
-24
lines changed

src/main/java/xyz/srnyx/lazylibrary/LazyListener.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,7 @@ public LazyListener() {
3131
@Override
3232
public void onGuildVoiceUpdate(@NotNull GuildVoiceUpdateEvent event) {
3333
// Joined
34-
if (event.getChannelJoined() != null) {
35-
onGuildVoiceJoin(new GuildVoiceJoinEvent(event));
36-
return;
37-
}
34+
if (event.getChannelJoined() != null) onGuildVoiceJoin(new GuildVoiceJoinEvent(event));
3835
// Left
3936
if (event.getChannelLeft() != null) onGuildVoiceLeave(new GuildVoiceLeaveEvent(event));
4037
}

src/main/java/xyz/srnyx/lazylibrary/events/GuildVoiceJoinEvent.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,21 +37,11 @@ public GuildVoiceJoinEvent(@NotNull GuildVoiceUpdateEvent event) {
3737
this(event.getJDA(), event.getResponseNumber(), event.getMember(), event.getChannelLeft());
3838
}
3939

40-
@Override @Nullable
41-
public AudioChannelUnion getChannelLeft() {
42-
return null;
43-
}
44-
4540
@Override @NotNull
4641
public AudioChannelUnion getChannelJoined() {
4742
return Objects.requireNonNull(super.getChannelJoined());
4843
}
4944

50-
@Override @Nullable
51-
public AudioChannel getOldValue() {
52-
return null;
53-
}
54-
5545
@Override @NotNull
5646
public AudioChannel getNewValue() {
5747
return Objects.requireNonNull(super.getNewValue());

src/main/java/xyz/srnyx/lazylibrary/events/GuildVoiceLeaveEvent.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,8 @@ public AudioChannelUnion getChannelLeft() {
4242
return Objects.requireNonNull(super.getChannelLeft());
4343
}
4444

45-
@Override @Nullable
46-
public AudioChannelUnion getChannelJoined() {
47-
return null;
48-
}
49-
5045
@Override @NotNull
5146
public AudioChannel getOldValue() {
5247
return Objects.requireNonNull(super.getOldValue());
5348
}
54-
55-
@Override @Nullable
56-
public AudioChannel getNewValue() {
57-
return null;
58-
}
5949
}

0 commit comments

Comments
 (0)