mirror of
https://github.com/bytedream/untisbot-discord.git
synced 2025-05-09 20:25:09 +02:00
Code reformatting
This commit is contained in:
parent
1a91ae3f2f
commit
246e130be9
@ -30,8 +30,8 @@ import java.util.concurrent.TimeUnit;
|
||||
*/
|
||||
public class Discord {
|
||||
|
||||
private final JDABuilder jdaBuilder;
|
||||
private static JDA jda = null;
|
||||
private final JDABuilder jdaBuilder;
|
||||
|
||||
/**
|
||||
* Configures the bot to make it ready to launch
|
||||
@ -47,6 +47,16 @@ public class Discord {
|
||||
jdaBuilder.addEventListeners(new DiscordCommandListener(storeType, new Crypt(encryptPassword), languages));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the running jda instance
|
||||
*
|
||||
* @return the jda instance
|
||||
* @since 1.2
|
||||
*/
|
||||
public static JDA getJda() {
|
||||
return jda;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show rich presence if a bot update was released within then last 24 hours
|
||||
*
|
||||
@ -99,14 +109,4 @@ public class Discord {
|
||||
jda = jdaBuilder.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the running jda instance
|
||||
*
|
||||
* @return the jda instance
|
||||
* @since 1.2
|
||||
*/
|
||||
public static JDA getJda() {
|
||||
return jda;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -28,7 +28,10 @@ import org.json.JSONObject;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
import java.awt.*;
|
||||
import java.io.*;
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.File;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.sql.SQLException;
|
||||
@ -54,9 +57,8 @@ public class DiscordCommandListener extends ListenerAdapter {
|
||||
private final HashMap<Long, Session> allUntisSessions = new HashMap<>();
|
||||
private final HashMap<Long, Timer> allTimetableChecker = new HashMap<>();
|
||||
private final Logger logger = Main.getLogger();
|
||||
private boolean maintenance = false;
|
||||
|
||||
private final HashMap<Long, LocalDateTime> dataUpdated = new HashMap<>();
|
||||
private boolean maintenance = false;
|
||||
|
||||
/**
|
||||
* Sets up the adapter
|
||||
@ -185,7 +187,8 @@ public class DiscordCommandListener extends ListenerAdapter {
|
||||
|
||||
try {
|
||||
session.reconnect();
|
||||
} catch (IOException ignore) {}
|
||||
} catch (IOException ignore) {
|
||||
}
|
||||
|
||||
EmbedBuilder embedBuilder = new EmbedBuilder();
|
||||
embedBuilder.setColor(new Color(30, 144, 255));
|
||||
@ -329,7 +332,8 @@ public class DiscordCommandListener extends ListenerAdapter {
|
||||
|
||||
try {
|
||||
session.reconnect();
|
||||
} catch (IOException ignore) {}
|
||||
} catch (IOException ignore) {
|
||||
}
|
||||
|
||||
LocalDate now = LocalDate.now();
|
||||
Short classId = data.getKlasseId();
|
||||
|
Loading…
x
Reference in New Issue
Block a user