Skip to content

Commit 2107a01

Browse files
bumped DynxstyGIT/discord-webhooks
1 parent f307da9 commit 2107a01

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

build.gradle.kts

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ dependencies {
4141
implementation("org.quartz-scheduler:quartz:2.3.2")
4242

4343
// Webhooks
44-
implementation("com.github.DynxstyGIT:discord-webhooks:682d3dee98")
44+
implementation("com.github.DynxstyGIT:discord-webhooks:74301a46a0")
4545

4646
// Lombok Annotations
4747
compileOnly("org.projectlombok:lombok:1.18.24")

src/main/java/net/javadiscord/javabot/listener/MessageLinkListener.java

+1-9
Original file line numberDiff line numberDiff line change
@@ -34,20 +34,12 @@ public void onMessageReceived(@NotNull MessageReceivedEvent event) {
3434
Optional<RestAction<Message>> optional = parseMessageUrl(matcher.group(), event.getJDA());
3535
optional.ifPresent(action -> action.queue(
3636
m -> WebhookUtil.ensureWebhookExists(event.getChannel().asTextChannel(),
37-
wh -> WebhookUtil.mirrorMessageToWebhook(wh, m, m.getContentRaw(), 0, ActionRow.of(Button.link(toURL(m.getJumpUrl()), "Jump to Message")))
37+
wh -> WebhookUtil.mirrorMessageToWebhook(wh, m, m.getContentRaw(), 0, ActionRow.of(Button.link(m.getJumpUrl(), "Jump to Message")))
3838
), ExceptionLogger::capture
3939
));
4040
}
4141
}
4242

43-
private @Nullable URL toURL(String url) {
44-
try {
45-
return new URL(url);
46-
} catch (MalformedURLException e) {
47-
return null;
48-
}
49-
}
50-
5143
/**
5244
* Tries to parse a Discord Message Link to the corresponding Message object.
5345
*

0 commit comments

Comments
 (0)