-
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bug when it doesn't reconnect after a network loss
- Loading branch information
1 parent
32301ee
commit 4166f71
Showing
2 changed files
with
22 additions
and
1 deletion.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
src/main/java/net/clementraynaud/skoice/listeners/StatusChangeListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package net.clementraynaud.skoice.listeners; | ||
|
||
import net.clementraynaud.skoice.Skoice; | ||
import net.dv8tion.jda.api.events.StatusChangeEvent; | ||
import net.dv8tion.jda.api.hooks.ListenerAdapter; | ||
|
||
public class StatusChangeListener extends ListenerAdapter { | ||
|
||
private final Skoice plugin; | ||
|
||
public StatusChangeListener(Skoice plugin) { | ||
this.plugin = plugin; | ||
} | ||
|
||
@Override | ||
public void onStatusChange(StatusChangeEvent event) { | ||
this.plugin.getBot().updateStatus(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters