will this work on the main thread?
This commit is contained in:
4
pom.xml
4
pom.xml
@ -6,13 +6,13 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-parent</artifactId>
|
<artifactId>spring-boot-starter-parent</artifactId>
|
||||||
<version>3.1.0</version>
|
<version>3.2.0</version>
|
||||||
<relativePath/> <!-- lookup parent from repository -->
|
<relativePath/> <!-- lookup parent from repository -->
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<groupId>me.braydon</groupId>
|
<groupId>me.braydon</groupId>
|
||||||
<artifactId>LicenseServer</artifactId>
|
<artifactId>LicenseServer</artifactId>
|
||||||
<version>1.0.4</version>
|
<version>1.0.5</version>
|
||||||
<description>A simple open-source licensing server for your products.</description>
|
<description>A simple open-source licensing server for your products.</description>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
@ -153,9 +153,9 @@ public final class DiscordService {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Initialize the bot
|
// Initialize the bot
|
||||||
new Thread(() -> {
|
|
||||||
long before = System.currentTimeMillis();
|
long before = System.currentTimeMillis();
|
||||||
log.info("Logging in..."); // Log that we're logging in
|
log.info("Logging in..."); // Log that we're logging in
|
||||||
|
System.out.println("Step 1");
|
||||||
jda = JDABuilder.createDefault(token)
|
jda = JDABuilder.createDefault(token)
|
||||||
.enableIntents(
|
.enableIntents(
|
||||||
GatewayIntent.GUILD_MEMBERS
|
GatewayIntent.GUILD_MEMBERS
|
||||||
@ -163,8 +163,10 @@ public final class DiscordService {
|
|||||||
.setActivity(Activity.watching("your licenses"))
|
.setActivity(Activity.watching("your licenses"))
|
||||||
.addEventListeners(new EventHandler())
|
.addEventListeners(new EventHandler())
|
||||||
.build();
|
.build();
|
||||||
|
System.out.println("step 2");
|
||||||
try {
|
try {
|
||||||
jda.awaitReady(); // Await JDA to be ready
|
jda.awaitReady(); // Await JDA to be ready
|
||||||
|
System.out.println("await complete");
|
||||||
|
|
||||||
// Log that we're logged in
|
// Log that we're logged in
|
||||||
log.info("Logged into {} in {}ms",
|
log.info("Logged into {} in {}ms",
|
||||||
@ -180,7 +182,7 @@ public final class DiscordService {
|
|||||||
} catch (InterruptedException ex) {
|
} catch (InterruptedException ex) {
|
||||||
ex.printStackTrace();
|
ex.printStackTrace();
|
||||||
}
|
}
|
||||||
}, "Discord Bot Thread").start();
|
System.out.println("finish");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user