mirror of
https://github.com/bytedream/untisbot-discord.git
synced 2025-05-09 20:25:09 +02:00
Removed unused imports
This commit is contained in:
parent
dd2d8c3cd7
commit
83ff5a98ac
10
Dockerfile
10
Dockerfile
@ -18,12 +18,12 @@ RUN apk add --no-cache openjdk8 curl && \
|
|||||||
RUN wget -O /untisbot-discord/lib/logback-core.jar https://repo1.maven.org/maven2/ch/qos/logback/logback-core/1.2.3/logback-core-1.2.3.jar && \
|
RUN wget -O /untisbot-discord/lib/logback-core.jar https://repo1.maven.org/maven2/ch/qos/logback/logback-core/1.2.3/logback-core-1.2.3.jar && \
|
||||||
wget -O /untisbot-discord/lib/logback-classic.jar https://repo1.maven.org/maven2/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar && \
|
wget -O /untisbot-discord/lib/logback-classic.jar https://repo1.maven.org/maven2/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar && \
|
||||||
wget -O /untisbot-discord/lib/mariadb-java-client.jar https://downloads.mariadb.com/Connectors/java/connector-java-2.7.0/mariadb-java-client-2.7.0.jar && \
|
wget -O /untisbot-discord/lib/mariadb-java-client.jar https://downloads.mariadb.com/Connectors/java/connector-java-2.7.0/mariadb-java-client-2.7.0.jar && \
|
||||||
wget -O /untisbot-discord/lib/untis4j.jar $(curl -s https://api.github.com/repos/ByteDream/untis4j/releases/latest | grep "browser_download_url" | grep "withDependencies.jar" | cut -d '"' -f 4) && \
|
wget -O /untisbot-discord/lib/untis4j.jar "$(curl -s https://api.github.com/repos/ByteDream/untis4j/releases/latest | grep "browser_download_url" | grep "withDependencies.jar" | cut -d '"' -f 4)" && \
|
||||||
wget -O /untisbot-discord/lib/JDA.jar $(curl -s https://api.github.com/repos/DV8FromTheWorld/JDA/releases/latest | grep "browser_download_url" | grep "withDependencies-min.jar" | cut -d '"' -f 4)
|
wget -O /untisbot-discord/lib/JDA.jar "$(curl -s https://api.github.com/repos/DV8FromTheWorld/JDA/releases/latest | grep "browser_download_url" | grep "withDependencies-min.jar" | cut -d '"' -f 4)"
|
||||||
|
|
||||||
ADD dockerfiles/run.sh /untisbot-discord/
|
COPY dockerfiles/run.sh /untisbot-discord/
|
||||||
ADD dockerfiles/database.sql /untisbot-discord/
|
COPY dockerfiles/database.sql /untisbot-discord/
|
||||||
ADD src/ /untisbot-discord/src
|
COPY src/ /untisbot-discord/src
|
||||||
|
|
||||||
EXPOSE 3306
|
EXPOSE 3306
|
||||||
|
|
||||||
|
@ -11,4 +11,4 @@ mariadb --user=root --password="$MYSQL_ROOT_PASSWORD" -h 127.0.0.1 Untis < "/unt
|
|||||||
cp -r /untisbot-discord/src/* /untisbot-discord/out/
|
cp -r /untisbot-discord/src/* /untisbot-discord/out/
|
||||||
rm -r $(find /untisbot-discord/out/ -name '*.java')
|
rm -r $(find /untisbot-discord/out/ -name '*.java')
|
||||||
|
|
||||||
java -Dfile.encoding=UTF-8 -cp "/untisbot-discord/out:/untisbot-discord/lib/*" org.bytedream.untisbot.Main mariadb token=$token user=root password=$MYSQL_ROOT_PASSWORD encrypt=$encrypt
|
java -Dfile.encoding=UTF-8 -cp "/untisbot-discord/out:/untisbot-discord/lib/*" org.bytedream.untisbot.Main mariadb token="$token" user=root password="$MYSQL_ROOT_PASSWORD" encrypt="$encrypt"
|
@ -126,7 +126,7 @@ public class Main {
|
|||||||
logger.info("Set custom language file");
|
logger.info("Set custom language file");
|
||||||
}
|
}
|
||||||
} catch (ArrayIndexOutOfBoundsException ignore) {
|
} catch (ArrayIndexOutOfBoundsException ignore) {
|
||||||
if (arg.trim().toLowerCase().equals("mariadb")) {
|
if (arg.trim().equalsIgnoreCase("mariadb")) {
|
||||||
storeType = StoreType.MARIADB;
|
storeType = StoreType.MARIADB;
|
||||||
logger.info("Using mariadb for data storage");
|
logger.info("Using mariadb for data storage");
|
||||||
}
|
}
|
||||||
|
@ -16,10 +16,11 @@ public class Utils {
|
|||||||
* @since 1.0
|
* @since 1.0
|
||||||
*/
|
*/
|
||||||
public static String advancedFormat(String stringToFormat, Map<String, Object> args) {
|
public static String advancedFormat(String stringToFormat, Map<String, Object> args) {
|
||||||
|
String formattedString = stringToFormat;
|
||||||
for (Map.Entry<String, Object> entry : args.entrySet()) {
|
for (Map.Entry<String, Object> entry : args.entrySet()) {
|
||||||
stringToFormat = stringToFormat.replace("{" + entry.getKey() + "}", entry.getValue().toString());
|
formattedString = formattedString.replace("{" + entry.getKey() + "}", entry.getValue().toString());
|
||||||
}
|
}
|
||||||
return stringToFormat;
|
return formattedString;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -4,8 +4,8 @@ import org.bytedream.untisbot.Crypt;
|
|||||||
import org.bytedream.untisbot.Main;
|
import org.bytedream.untisbot.Main;
|
||||||
|
|
||||||
import java.security.GeneralSecurityException;
|
import java.security.GeneralSecurityException;
|
||||||
import java.sql.*;
|
|
||||||
import java.sql.Date;
|
import java.sql.Date;
|
||||||
|
import java.sql.*;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.format.DateTimeFormatter;
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
@ -33,7 +33,6 @@ import java.io.IOException;
|
|||||||
import java.net.MalformedURLException;
|
import java.net.MalformedURLException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.time.LocalTime;
|
import java.time.LocalTime;
|
||||||
import java.time.format.DateTimeFormatter;
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
@ -2,7 +2,6 @@ package org.bytedream.untisbot.untis;
|
|||||||
|
|
||||||
import org.bytedream.untis4j.responseObjects.Timetable;
|
import org.bytedream.untis4j.responseObjects.Timetable;
|
||||||
|
|
||||||
import java.sql.Time;
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
@ -1,11 +1,8 @@
|
|||||||
package org.bytedream.untisbot.untis;
|
package org.bytedream.untisbot.untis;
|
||||||
|
|
||||||
import org.bytedream.untis4j.LoginException;
|
|
||||||
import org.bytedream.untis4j.RequestManager;
|
|
||||||
import org.bytedream.untis4j.Session;
|
import org.bytedream.untis4j.Session;
|
||||||
import org.bytedream.untis4j.UntisUtils;
|
import org.bytedream.untis4j.UntisUtils;
|
||||||
import org.bytedream.untis4j.responseObjects.Timetable;
|
import org.bytedream.untis4j.responseObjects.Timetable;
|
||||||
import org.bytedream.untisbot.Main;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
@ -113,6 +110,8 @@ public class TimetableChecker {
|
|||||||
cancelledLesson.add(lesson);
|
cancelledLesson.add(lesson);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
// this isn't implemented yet
|
||||||
}
|
}
|
||||||
} else if (lesson.getCode() == UntisUtils.LessonCode.IRREGULAR && timetable.searchByStartTime(lesson.getStartTime()).size() == 1 && !allIgnoredLessons.contains(lesson)) {
|
} else if (lesson.getCode() == UntisUtils.LessonCode.IRREGULAR && timetable.searchByStartTime(lesson.getStartTime()).size() == 1 && !allIgnoredLessons.contains(lesson)) {
|
||||||
// lesson is maybe moved
|
// lesson is maybe moved
|
||||||
|
Loading…
x
Reference in New Issue
Block a user