File tree 2 files changed +5
-1
lines changed
src/main/java/net/clementraynaud/skoice
2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ public VoiceChannel getVoiceChannel() {
56
56
}
57
57
58
58
public void setStatus () {
59
- if (this .plugin .getBot ().isAdministrator ()) {
59
+ if (! this .plugin .getBot ().isAdministrator ()) {
60
60
return ;
61
61
}
62
62
VoiceChannel voiceChannel = this .getVoiceChannel ();
Original file line number Diff line number Diff line change @@ -47,6 +47,8 @@ public ReadyListener(Skoice plugin) {
47
47
@ Override
48
48
public void onReady (ReadyEvent event ) {
49
49
50
+ this .setDefaultFailure ();
51
+
50
52
Player tokenManager = this .plugin .getBot ().getTokenManager ();
51
53
52
54
this .plugin .getBot ().getJDA ().retrieveApplicationInfo ().queue (applicationInfo -> {
@@ -62,7 +64,9 @@ public void onReady(ReadyEvent event) {
62
64
63
65
this .setup (tokenManager );
64
66
});
67
+ }
65
68
69
+ private void setDefaultFailure () {
66
70
Consumer <? super Throwable > defaultFailure = RestAction .getDefaultFailure ();
67
71
RestAction .setDefaultFailure (throwable -> {
68
72
if (throwable instanceof ErrorResponseException ) {
You can’t perform that action at this time.
0 commit comments