sxcybot

OSRS oriented Discord Bot
git clone git://git.wimdupont.com/sxcybot.git
Log | Files | Refs | README | LICENSE

commit a9d4c3de091ad63b579f8064c06a0296d2c34b7d
parent 06d9b1cb06c70c14f69923b21fc54836cde9e88c
Author: WimDupont <WimDupont@users.noreply.gitlab.com>
Date:   Sun, 23 Jan 2022 12:07:09 +0100

jdk17 and version bump

Diffstat:
AREADME.md | 7+++++++
Mpom.xml | 19++++++-------------
Msrc/main/java/com/sxcy/sxcybot/SxcyBotApplication.java | 3+++
Msrc/main/resources/application.properties | 4++--
Msrc/main/resources/todo.adoc | 3+++
Msrc/test/java/com/sxcy/sxcybot/client/HiScoreClientTest.java | 2+-
6 files changed, 22 insertions(+), 16 deletions(-)

diff --git a/README.md b/README.md @@ -0,0 +1,7 @@ +# SxcyBot + +## Important + +Currently JDK17 requires following argument on startup (https://github.com/DV8FromTheWorld/JDA/issues/1858): + +-Djava.util.concurrent.ForkJoinPool.common.parallelism=1 diff --git a/pom.xml b/pom.xml @@ -5,7 +5,7 @@ <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> - <version>2.5.6</version> + <version>2.6.3</version> <relativePath/> <!-- lookup parent from repository --> </parent> <groupId>com.sxcy</groupId> @@ -15,7 +15,7 @@ <description>Sxcy's OSRS oriented Discord Bot</description> <properties> - <java.version>11</java.version> + <java.version>17</java.version> </properties> <dependencies> @@ -49,13 +49,7 @@ <dependency> <groupId>net.dv8tion</groupId> <artifactId>JDA</artifactId> - <version>4.2.0_249</version> - </dependency> - <dependency> - <groupId>org.easymock</groupId> - <artifactId>easymock</artifactId> - <version>4.3</version> - <scope>test</scope> + <version>4.4.0_350</version> </dependency> <dependency> <groupId>org.flywaydb</groupId> @@ -64,7 +58,7 @@ <dependency> <groupId>org.flywaydb</groupId> <artifactId>flyway-maven-plugin</artifactId> - <version>8.0.1</version> + <version>8.4.1</version> </dependency> </dependencies> @@ -77,7 +71,6 @@ <plugin> <groupId>org.flywaydb</groupId> <artifactId>flyway-maven-plugin</artifactId> - <version>7.3.1</version> <configuration> <url>jdbc:mariadb://localhost:3306/sxcybot</url> <user>test</user> @@ -88,8 +81,8 @@ <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> - <source>11</source> - <target>11</target> + <source>17</source> + <target>17</target> </configuration> </plugin> </plugins> diff --git a/src/main/java/com/sxcy/sxcybot/SxcyBotApplication.java b/src/main/java/com/sxcy/sxcybot/SxcyBotApplication.java @@ -56,6 +56,7 @@ public class SxcyBotApplication implements CommandLineRunner { @Override public void run(String[] args) throws LoginException { + log.debug("Jda to be created"); JDA jda = JDABuilder.createLight(token, GatewayIntent.GUILD_MESSAGES, GatewayIntent.DIRECT_MESSAGES, @@ -67,7 +68,9 @@ public class SxcyBotApplication implements CommandLineRunner { .setActivity(Activity.listening(Commands.COMMAND_PREFIX + Command.HELP.name().toLowerCase())) .build(); try { + log.debug("Awaiting jda " + jda); jda.awaitReady(); + log.debug("Jda " + jda + " ready"); pvMRoleResolver.setJda(jda); processArgs(jda, args); } catch (InterruptedException e) { diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties @@ -1,8 +1,8 @@ spring.datasource.url=jdbc:mariadb://localhost:3306/sxcybot spring.datasource.driver-class-name=org.mariadb.jdbc.Driver spring.jpa.database-platform=org.hibernate.dialect.MySQL5Dialect -spring.jpa.generate-ddl=true -spring.jpa.hibernate.ddl-auto=update +#spring.jpa.generate-ddl=true +#spring.jpa.hibernate.ddl-auto=update spring.flyway.url=jdbc:mariadb://localhost:3306/sxcybot #Every Month at 1 AM (server time) #0 0 1 1 * * diff --git a/src/main/resources/todo.adoc b/src/main/resources/todo.adoc @@ -13,6 +13,9 @@ * Make boss changes updateable without breaking code (hiscoreClient indexes are hardcoded) * Make new channel startups easier (especially channel_detail and guild_role inserts) +NOTIFY on hiscore # of lines update +order sb-bosslist alphabetically + == Nice to have == Future plans diff --git a/src/test/java/com/sxcy/sxcybot/client/HiScoreClientTest.java b/src/test/java/com/sxcy/sxcybot/client/HiScoreClientTest.java @@ -85,7 +85,7 @@ class HiScoreClientTest { .build(), OsrsHiscoreBoss.builder() .name("Wintertodt") - .orderValue(80) + .orderValue(81) .build() );