Skip to content

Commit 8dcaca3

Browse files
committed
squash error
1 parent 66ccbf3 commit 8dcaca3

File tree

2 files changed

+18
-13
lines changed

2 files changed

+18
-13
lines changed

build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ tasks.build {
8181

8282
tasks.shadowJar {
8383
isEnableRelocation = true
84-
relocate("io.netty", "io.netty")
85-
exclude("io/netty/**")
84+
relocate("io.netty.buffer", "io.netty.buffer")
85+
relocate("io.netty.util", "io.netty.util")
8686
relocationPrefix = "net.azisaba.ryuzupluginchat.dependency"
8787
}
8888

src/main/java/net/azisaba/ryuzupluginchat/RyuZUPluginChat.java

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -223,17 +223,22 @@ private void setupRedisConnections() {
223223
}
224224

225225
private void setupDiscordConnection() {
226-
vcLunaChatChannelSharer.setLunaChatChannelName(rpcConfig.getVcCommandLunaChatChannel());
227-
discordHandler = new DiscordHandler(this, rpcConfig.getDiscordBotToken());
228-
boolean initResult = discordHandler.init();
229-
230-
if (!initResult) {
231-
getLogger().warning("Failed to login to Discord Bot. Is that the correct Token?");
232-
return;
233-
}
234-
235-
for (DiscordMessageConnection connectionData : rpcConfig.getMessageConnections()) {
236-
discordHandler.connectUsing(connectionData);
226+
try {
227+
vcLunaChatChannelSharer.setLunaChatChannelName(rpcConfig.getVcCommandLunaChatChannel());
228+
discordHandler = new DiscordHandler(this, rpcConfig.getDiscordBotToken());
229+
boolean initResult = discordHandler.init();
230+
231+
if (!initResult) {
232+
getLogger().warning("Failed to login to Discord Bot. Is that the correct Token?");
233+
return;
234+
}
235+
236+
for (DiscordMessageConnection connectionData : rpcConfig.getMessageConnections()) {
237+
discordHandler.connectUsing(connectionData);
238+
}
239+
} catch (Throwable e) {
240+
getLogger().warning("Failed to setup Discord connection :(");
241+
e.printStackTrace();
237242
}
238243
}
239244

0 commit comments

Comments
 (0)